Jump to content
  • Advertisement
Sign in to follow this  
Dinomike

WAV vs MP3

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

When using DirectX 9 to play ambient music in a game, are there any disadvantages to using the MP3 format? Since MP3 files are considerably smaller than WAV files, I would probably want to use an MP3. However, I have also heard that playing MP3s can slow a program down. I was wondering if this is an issue when writing computer games. Thanks, Mike

Share this post


Link to post
Share on other sites
Advertisement
Generally it's not a problem, the amount of CPU used is minimal. However, it's considerably more programming work to write an MP3 decoder, since most audio APIs only deal with uncompressed audio.

I'd also highly recommend the Ogg Vorbis format, which gives pretty much exactly the same quality, file size and decompression performance as MP3, and is patent free.

Share this post


Link to post
Share on other sites
I often think that some advice should come with expiration dates. There was a point in time that decoding an MP3 consumed a significant fraction of CPU resources ... back in the days of the original Pentium.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
I often think that some advice should come with expiration dates. There was a point in time that decoding an MP3 consumed a significant fraction of CPU resources ... back in the days of the original Pentium.
It can still be a problem if you are heavily CPU bound, and fully utilising all cores of your processor. However, given the rise of multiple-core processors, and the general lack of multi-threading in games, it is most likely that this will not happen to you.

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!