Hello!
I''ve had a headbreaking problem (for me
![](smile.gif)
) the last day
about DirectSound. The SDK samples somehow work around and
I couldn''t find another nice way.
(It''s still DX6, but I think it''s more a principle than
a software problem)
I know that to play a sound - let''s say an engine in a car -
I must create a secondary buffer, load wave data ... and play it.
It''ll be mixed in the primary buffer. So far so good
![](smile.gif)
Now my problem arises.
What to do if I have 5 cars (all with the same engine sound).
I don''t want to load the same wave file in memory 5 times,
but how can I avoid this if every sound that is played
has to have it''s own sound buffer?
I thought maybe it would possible to load all wave files that are
needed in a buffer object once for every wave and than use
DuplicateBuffer (or how it''s called
![](wink.gif)
) for the playing sound
so it doesnt need to allocate new memory. (i.e. refer to the wave
memory)
But I read in the SDK doc that it _might_ not work all time - so it
seems quite useful
![](wink.gif)
How is this issue handled in other games?
I would be thanksful for every help.
Ciao!
![](http://www.moonbyte.de/img/home/roppi2.jpg)
Have a look at our game "Crashday" at www.moonbyte.de