Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Audio
»
How many threads are created for multiple sf::Sound and/or sf::Music?
Print
Pages: [
1
]
Author
Topic: How many threads are created for multiple sf::Sound and/or sf::Music? (Read 2876 times)
0 Members and 1 Guest are viewing this topic.
jwurzer
Newbie
Posts: 10
How many threads are created for multiple sf::Sound and/or sf::Music?
«
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
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: How many threads are created for multiple sf::Sound and/or sf::Music?
«
Reply #1 on:
December 06, 2017, 08:41:47 pm »
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).
Logged
Laurent Gomila - SFML developer
jwurzer
Newbie
Posts: 10
Re: How many threads are created for multiple sf::Sound and/or sf::Music?
«
Reply #2 on:
December 06, 2017, 09:04:05 pm »
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?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: How many threads are created for multiple sf::Sound and/or sf::Music?
«
Reply #3 on:
December 06, 2017, 09:52:02 pm »
That is correct, yes.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Audio
»
How many threads are created for multiple sf::Sound and/or sf::Music?
anything