SFML community forums
Help => Audio => Topic started by: jwurzer on December 06, 2017, 07:27:01 pm
-
The tutorial page "Playing sounds and music" ( https://www.sfml-dev.org/tutorials/2.4/audio-sounds.php ) says that "Sounds (and music) are played in a separate thread."
Is there only one separate thread for all current used sf::Sound's and sf::Music's or create each sf::Sound and sf::Music its own thread?
Best regards
-
There's (most likely, it's an internal detail of OpenAL Soft) a single thread for audio processing, plus one thread created by SFML for each sf::SoundStream (sf::Music).
-
Thank you for the info!
This means that a instance of sf::Sound (which is no derivation of sf::SoundStream) with a sf::SoundBuffer creates no additional thread (only the thread(s) which already exist for audio processing are used to play sf::Sound). Is that correct?
-
That is correct, yes.