Jump to content
  • Advertisement
Sign in to follow this  
nickwinters

[.net] Playing MP3s with DirectSound

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

Advertisement
frankly, no.

From the MSDN site: 'DirectSound does not support compressed WAV formats.'

Share this post


Link to post
Share on other sites
You can decompress the encoded files using Win32's multimedia functions of the Audio Compression Manager. Unfortunately, there is no freely available .NET wrapper for these, and dealing the functions is frankly a bit of a pain. However, it's mostly due to poor documentation and strange design rather than any inherent difficulty, so if you put in a little bit of time, it should be easy to figure out. From there, pumping the decoded PCM data into a DirectSound buffer is trivial.

Another much simpler alternative would be to just use the AudioVideoPlayback.Audio class.

Hope this helps point you in the right direction.

-bodisiw

Share this post


Link to post
Share on other sites
Thanks. I was planning on avoiding AudioVideoPlayback, but I guess I'll just use .wav files for sound effects and use mp3s for background music.

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!