Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

jason hirst

DirectSound secondary buffer management

This topic is 5527 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Guys, I''m working on developing a simple DirectSound interface to play sounds in a project I''m working on. My question is in regards to the correct (or optimal) time to create secondary buffers to play the sounds in. If I''m maintaining a list of all the sounds in memory up to some maximum amount (my interface requires the registration of a sound before playing it), would it be better to create the secondary buffers when the sound is requested to start playing? I.e. Play(...) would create the buffer, copy the sound data in, play the sound then delete the buffer. Or would it be better to allocate a set number of buffers at initialization time and then when Play is called load the data into the buffer and start playing it? If I do allocate a set number of buffers at program load what would be a reasonable amount to work with? Would allocating 32 or so be too greedy on the part of my program (or flat out unnecessary)?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!