Ball bounces twice, sound plays once??

Started by
1 comment, last by Shazer 23 years, 2 months ago
I am using direct sound. In my Breakout game, whenever the ball hits a wall or the paddle, it boings... whenever it hits a block, it blooeeps... But, whenever there are two sounds of the same type really close together, it only plays one. How can I make it sound twice?? The Shaz "I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run SuperNova Games
Optimism is not a state of mind, but a form of life!SuperNova Games
Advertisement
Thats because by default DirectSound will not replay a sound if a sound is already playing. What I did was to have a ReplicateSound function copy the buffer via duplicateBuffer or something like that. Look up the IDirectSound * interface. Remember to release the copied buffer once the sound has finished playing. Also, the function duplicateBuffer only copies the interface. The buffer is not duplicated.

------------------------------
BCB DX Library - RAD C++ Game development for BCB
Thanks, freak... I''ll look into it.

The Shaz



"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run

SuperNova Games
Optimism is not a state of mind, but a form of life!SuperNova Games

This topic is closed to new replies.

Advertisement