Jump to content
  • Advertisement
Sign in to follow this  
vcGamer

DirectSound problem

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

hi everyone

I've a question regarding DirectSound, I use VS 2008 & Managed DX, how can I change my sound volume? (wav file), I have a plane that flies around the globe, this plane can be viewed by a free camera, I want to change the plane sound volume based on camera-plane distance, how can I do it?

what is the available range for BufferChannel.Volume? I think it is between -1 and -9999, is it OK? how can I mute my sound? is there any sample showing this feature? is there any obligation to use 3d sound? I get strange results when using SetVolume.

thanks

Share this post


Link to post
Share on other sites
Advertisement
I'm not familiar with MDX, but, in C++, the sound needs to be created with DSBCAPS_CTRLVOLUME. Do you do that (or its equivalent)?

Share this post


Link to post
Share on other sites
Quote:
I get strange results when using SetVolume


How strange ? Does it crash ?

Or do you hear clicks or similar ? This can happen if you change it too fast, in that case you alter the wave-form in way it is hearable. If you do it slowly enough, i.e. gradually changing to a desired value, it should work.

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!