Jump to content
  • Advertisement

Archived

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

Shazer

Ball bounces twice, sound plays once??

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

Share this post


Link to post
Share on other sites
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

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!