Jump to content
  • Advertisement
Sign in to follow this  
Marlun

[.net] Restart a SecondaryBuffer?

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

Hello! I'm having some problems with the sound for a simple game I'm making. When I click LeftCTRL the spaceship shoots and a sound is played but if I click it fast multiple times the shoots is created but the sound is not fast enough to play as many times as I shoot. This is because to play the secondarybuffer again it have to wait for the last sound to finish. How can fix this? I want the sound to play as many times as I click. Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
Check to see if the sound is already playing, if it's already playing set the position back to 0 (this will restart the sound)

Share this post


Link to post
Share on other sites
Thanks for the answer! I know found the SetCurrentPosition method and it worked great! =)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!