Sign in to follow this  
Nacho

Keeping the audio in a separate thread?

Recommended Posts

Nacho    205
Hi there! I was reading the Quake III Arena entry on wikipedia and I was surprised to learn that those sound artifacts that sometimes appear while navigating the menus are produced because the sound mixer is not running in a separate thread: http://en.wikipedia.org/wiki/Quake_3#Sound Up until now, I´ve made all my games run in a single thread. Mind you, the games were not nearly as complex as QIII :) Nonetheless, I´ve just started developing a new game and, before it´s too late, I´d like to hear your opinions on the issue of keeping the audio mixer in a separate thread. I´d also like to hear your opinions on which parts of a game you consider it´s a good idea to move into a separate thread. Thanks in advance, --Nacho

Share this post


Link to post
Share on other sites
Telastyn    3777
I part my audio off into its own thread. I think it's a fairly descent idea since audio is something that has very bad results if not processed regularly. Also, it lends itself to multi-threaded design. It's easy to split off since most games need nothing more than 'play this sound now' communication between audio and the rest of the game.

AI and pathfinding I hear are good candidates for their own threads. I personally split the client and server into separate threads for single player or a non-dedicated host.

Share this post


Link to post
Share on other sites
Nacho    205
Quote:
Original post by TelastynIt's easy to split off since most games need nothing more than 'play this sound now' communication between audio and the rest of the game.


Thanks for your reply. Which method do you use to achieve this communication? Do you use message passing or mutexes?

--Nacho

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this