Playing A DirectSound Buffer Twice
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?
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
Cheers,
John
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."
/MindWipe
"If it doesn''t fit, force it; if it breaks, it needed replacement anyway."
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.
You get another LPDIRECTSOUNDBUFFER, but that''s just a copy of the interface, not the sound data.
You''re good to go.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement