Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hiura

Pages: 1 2 [3] 4 5 ... 129
31
General / Re: Xcode templates not working
« on: March 17, 2018, 11:40:18 pm »
I see where the confusion comes from, but this tutorial https://www.sfml-dev.org/tutorials/2.4/start-osx.php#installing-sfml reads First of all you need to download the SFML SDK which is available on the download page.. The templates available from the download page are pre-configured for the specific instructions from the tutorial.

On the other hand, https://www.sfml-dev.org/tutorials/2.4/compile-with-cmake.php is dedicated to building & configuring SFML.

I'm not sure how to make things clearer. Any suggestions? :)



On high-dpi displays: if you submit a PR to add an on/off option in the app bundle template wizard, I'd accept this as a fix (because I'd argue the default should be 'on'). I think this is the right file to modify: https://github.com/SFML/SFML/blob/master/tools/xcode/templates/SFML/SFML%20Bundle.xctemplate/TemplateInfo.plist

32
General / Re: Xcode templates not working
« on: March 17, 2018, 06:40:55 pm »
Quote
After copying the templates to the templates folder

How did you copy the files? The templates are configured according to your CMake settings. Manually copying the files won't work, unfortunately.

Either use CMake to install the templates, or manually configure this file: https://github.com/SFML/SFML/blob/master/tools/xcode/templates/SFML/SFML%20Compiler.xctemplate/TemplateInfo.plist.in I think it's the only one. `*.in` files should also be renamed to drop the suffix.

33
General / Re: Help automatically specifying LD_LIBRARY_PATH ?
« on: March 17, 2018, 06:29:05 pm »
On mac, you can completely ditch Xcode and do everything it does yourself. You'll might have to play with `install_name_tool` (I don't remember exactly to be honest) when creating the .app folder & its internal components. To ship your app, it's pretty much a matter of copying the dependencies into your app bundle.

If you created an application bundle for SFML project with the Xcode wizard, you can go to your project build phases and have a look at the script created for you to get some inspiration. You can also have a look at all the steps Xcode does to get the full picture.

Or, I guess, you could use cmake on all platforms and not worry about all that. I understand you want to learn how it works, but once you got the idea you probably want to have something easy to maintain. I'll let you judge if it worth it for you or not. ;-)

34
General / Re: FindSFML.cmake users, help test the new SFMLConfig.cmake
« on: March 04, 2018, 05:35:45 pm »
I've tested the changes on mac, but others are welcome to try it on their end as well. ;-)

35
Graphics / Re: xcode image loading error
« on: February 08, 2018, 05:16:23 pm »
Have a look at the official tutorial for macOS and Xcode, we provide specific tools for that OS to deal with resources.

36
SFML development / Re: iOS development progress
« on: January 31, 2018, 04:21:48 pm »
Yeah, let me know if the clipboard feature works; I'm curious to know ^^


correct link: https://github.com/SFML/SFML/commit/0637a2ef9938b842252056a1b2e69963391ed3ee


37
General discussions / Re: Unfreezing the API
« on: January 26, 2018, 05:51:55 pm »
Thanks for sharing your thoughts, all of you. It's good we discuss this. :)

since there is less contributions from the team now, we have to rely on more contributions from within the community.

Yes, this is true. And I think everybody in the team is ready for more and more good contributions from the community.

Sharing my feelings on that, any why I've put emphasis on good: a while back we created this document as an attempt to help contributors shape their feature requests & bug reports. Some people obviously respect this document and inject good energy in this project, but I always have the feeling they are very few and instead -- as eXpl0it3r's summarised -- we get a lot of, according to my interpretation of good and bad, low quality contributions, or even noise.

Now, dealing with this is not an issue for some people. For me, however, it's something seriously frustrating, and for that I'm extremely grateful to the one(s) who invest so much of their time to triage freshly open issues.

- "More planning, more roadmaps": As my opening statement said, I do agree that more should have been done earlier. At the same time, I don't really see much activity in that regards. I've started a SFML Development sub-form with many topics to discuss. The participation is been quite thin and I haven't gotten any requests for discussing a new/next topic, nor has anyone else of the SFML Team felt the need to start a new discussion.
Besides that we have the GitHub milestone showing what is more or less planned for the current release. We also have a GitHub project that shows some more of the current status of tasks.
My response to an outcry of "there's no focus", I've created a thread on what our current focus should be. I've even made it available on IRC, Twitter and Reddit, but the influx of participation is still missing.
Planning and roadmaps only help and work, if there are actually people willing to participate and move things forward and not just sit on their own topic, complaining why it's not being taken care of.

I'm sure there are some more ideas people have mentioned, but I currently can't think of anything more.

For the record, I have a few more ideas that I'd like to discuss regarding inputs, but I'd rather wait for the scancode thing to be properly wrapped up before starting more discussion and further diluting the time of people (such as the crucially needed testers). Does mystery motivate people to test scancodes & provide the linux missing implementation? (:

PS. I also share the concerns about stability: it can only make SFML more attractive IMO.

38
Window / Re: Questions about handling a window
« on: January 18, 2018, 01:11:29 pm »
Maximising the window from code has been discussed for a while but hasn't yet been implemented, more details here

Contributions are more than welcomed! Even if the patch is for one OS, others from the community can chip in and add support for the other OSes.  ;)

39
Audio / Re: Microphone capure and play
« on: January 17, 2018, 03:59:51 pm »
You got me curious... so I've implemented something relatively basic POC.

The first thing I changed in your code was the need to stop and restart the recording as this might produce glitches and might as well be slow (I haven't measured though!).

The code below is complete, so you can try it as-is. It is based not on `SoundBuffer` or `SoundBufferRecorder` but on the abstract `SoundRecorder` for the input and the abstract `SoundStream` for the output. It is basically a concurrent consumer-producer problem so I've used atomic/mutex/lock/condition variables to solve it (should be C++11 compatible).

It was hacked quite quickly so I don't guarantee it's bug-free, but it should be a good start, I believe, for more complex processing of the captured samples.

#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>

#include <atomic>
#include <cassert>
#include <mutex>
#include <queue>


// Useful to hold onto the memory when converting it into a Chunk.
struct Samples {
    Samples(sf::Int16 const* ss, std::size_t count) {
        samples.reserve(count);
        std::copy_n(ss, count, std::back_inserter(samples));
    }

    Samples() {}

    std::vector<sf::Int16> samples;
};


class PlaybackRecorder : private sf::SoundRecorder, private sf::SoundStream {
public: /** API **/

    // Initialise capturing input & setup output
    void start() {
        sf::SoundRecorder::start();

        sf::SoundStream::initialize(sf::SoundRecorder::getChannelCount(), sf::SoundRecorder::getSampleRate());
        sf::SoundStream::play();
    }

    // Stop both recording & playback
    void stop() {
        sf::SoundRecorder::stop();
        sf::SoundStream::stop();
    }

    bool isRunning() { return isRecording; }


    ~PlaybackRecorder() {
        stop();
    }


protected: /** OVERRIDING SoundRecorder **/

    bool onProcessSamples(sf::Int16 const* samples, std::size_t sampleCount) override {
        {
            std::lock_guard<std::mutex> lock(mutex);
            data.emplace(samples, sampleCount);
        }
        cv.notify_one();
        return true; // continue capture
    }

    bool onStart() override {
        isRecording = true;
        return true;
    }

    void onStop() override {
        isRecording = false;
        cv.notify_one();
    }


protected: /** OVERRIDING SoundStream **/

    bool onGetData(Chunk& chunk) override {
        // Wait until either:
        //  a) the recording was stopped
        //  b) new data is available
        std::unique_lock<std::mutex> lock(mutex);
        cv.wait(lock, [this]{ return !isRecording || !data.empty(); });

        // Lock was acquired, examine which case we're into:
        if (!isRecording) return false; // stop playing.
        else {
            assert(!data.empty());

            playingSamples.samples = std::move(data.front().samples);
            data.pop();
            chunk.sampleCount = playingSamples.samples.size();
            chunk.samples = playingSamples.samples.data();
            return true;
        }
    }

    void onSeek(sf::Time) override { /* Not supported, silently does nothing. */ }

private:
    std::atomic<bool> isRecording{false};
    std::mutex mutex; // protects `data`
    std::condition_variable cv; // notify consumer thread of new samples
    std::queue<Samples> data; // samples come in from the recorder, and popped by the output stream
    Samples playingSamples; // used by the output stream.
};

int main(int, char const**)
{
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML PlayBack");

    if (!sf::SoundRecorder::isAvailable()) {
        return EXIT_FAILURE;
    }

    PlaybackRecorder input;
    input.start();

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed) {
                window.close();
            }

            if (event.type == sf::Event::KeyPressed) {
                if (input.isRunning()) input.stop();
                else input.start();
            }
        }

        window.clear(input.isRunning() ? sf::Color::White : sf::Color::Black);
        window.display();
    }

    return EXIT_SUCCESS;
}
 

40
General / Re: Bluetooth Xbox one controller OS X not working
« on: January 12, 2018, 10:24:10 pm »
Did you try https://github.com/SFML/SFML/pull/1248? It was merged in master after 2.4.2 was released.

41
General discussions / Re: How is SFML going?
« on: January 12, 2018, 10:19:28 pm »
Scancode differ from keycode in that they don't depend on the current keyboard layout. You can therefore save a configuration of scancode binding for your app's actions and share it easily. Text input cannot be used for that as it 1) depends on the layout and 2) depends on the state of some particular keys (e.g. shift). More on them here: https://github.com/SFML/SFML/pull/1235/files/f6d95ce2576bdb7bccf1fc97af2cc69d0e982f55#diff-7fa0f083c484ef5d846ad4160b129c38R161

42
General discussions / Re: How is SFML going?
« on: January 03, 2018, 05:37:17 pm »
Yes, we have a LOT of (good) ideas for SFML 2.5+/3, but as you mentioned the implementation doesn't follow. I guess most of us (me included) in the "SFML team" have much less time available for SFML and therefore we don't contribute as much as we used to.

But we also lack strong contributions from the community. Yes, we get valuable feedback like bug reports and feature requests, and I'm really grateful to anyone making SFML better, but bugfix or feature implementations are more scarce. It is also obvious that the tasks in front of us are big so without strong collaborations we cannot move forward.

A good place to start for people who want to contribute is, for example, here: https://en.sfml-dev.org/forums/index.php?topic=22480.0

43
TBH I'm not sure I understand/remember how rpath works ATM with SFML/Cmake. I know cmake changed a few things regarding rpath since a few versions, we also got some contributions into SFML on that, ... And I think at some point what you requested used to work. So, feel free to change anything to make it work again (including the framework themselves). :-)

44
Window / Re: Caps lock
« on: January 03, 2018, 05:15:22 pm »
Please do not necroment threads. This discussion is somewhat outdated. Have a look (and contribute to) https://github.com/SFML/SFML/pull/1235. ;-)

45
General / Re: Internal dependencies of SFML modules
« on: December 08, 2017, 11:59:20 pm »
I'm in the process of creating conan packages for SFML

That's interesting new! Let us know if you manage to get it working.  :)

Pages: 1 2 [3] 4 5 ... 129
anything