Jump to content
  • Advertisement

Archived

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

Galileo430

Playing A DirectSound Buffer Twice

This topic is 6150 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

I was wondering if there was a way I could play a single DirectSound buffer while it''s already playing in order to create 2 sounds in the primary buffer?

Share this post


Link to post
Share on other sites
Advertisement
DuplicateSoundBuffer is the call you need. This makes a copy of the buffer (without actually copying the wav data - theoretically) so you can issue a Play command on the new version.

Cheers,
John

Share this post


Link to post
Share on other sites
Hm... DX Audio(Dx8) does in automaticly. Atleast I don''t have to do any sound duplications and it works like a charm

/MindWipe

"If it doesn''t fit, force it; if it breaks, it needed replacement anyway."

Share this post


Link to post
Share on other sites
DuplicateSoundBuffer doesn''t double the memory required for the sound. It doesn''t make a duplicate copy of the sound itself, it just creates another play pointer that references the same wav data.
You get another LPDIRECTSOUNDBUFFER, but that''s just a copy of the interface, not the sound data.
You''re good to go.

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!