Ingame music: WAV / MP3

Ambient sounds, game effects and music creation.

Ingame music: WAV / MP3

Postby Freem4n on Fri Jun 11, 2010 12:09 am

This question is propably stupid...
usually, many game developers and modders use the mp3 format for ingame music, while sound effects and any other sounds are in WAV. But I don't really get the point. Why not just having everything in WAV?
Freem4n
Member
Member
 
Joined: Mon Jun 07, 2010 5:34 pm

Re: Ingame music: WAV / MP3

Postby Dives on Fri Jun 11, 2010 12:20 am

Many use mp3 for music because it is a much smaller file size than wav. However not all sound files are mp3 because there is less processing needed when playing wav files. You can try it in source. Make a bunch of mp3 files played my ambient_generics and occasionally the game will stutter when it tries to play one. That doesn't happen with wavs.
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: Ingame music: WAV / MP3

Postby Terr on Fri Jun 11, 2010 12:24 am

MP3: Compressed, but takes more CPU power to prepare and play.
WAV: Uncompressed, but very fast and easy to play lots of them at once or on-demand.

Therefore you tend to find MP3's for long non-interactive stuff like music, and WAV's for short noises where you might want to be playing a kerjillion of them at the same time from different places in the game world.
Terr
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 12, 2009 11:35 pm

Re: Ingame music: WAV / MP3

Postby Freem4n on Fri Jun 11, 2010 8:18 am

Thanks!

I guess, that's why in L4D most tracks are in wav, because of the dynamic playback.

So in the end, it doesn't matter whether I use WAV or MP3 for music tracks, only if I want to save a few MB, I should use MP3, correct?
Freem4n
Member
Member
 
Joined: Mon Jun 07, 2010 5:34 pm

Re: Ingame music: WAV / MP3

Postby Dives on Fri Jun 11, 2010 8:23 am

Freem4n wrote:Thanks!

I guess, that's why in L4D most tracks are in wav, because of the dynamic playback.

So in the end, it doesn't matter whether I use WAV or MP3 for music tracks, only if I want to save a few MB, I should use MP3, correct?


If its a track longer than 20 seconds, I'd go for mp3. Just remember mp3 can't be auto looped in source without obnoxious jury rigging.

Also wavs are currently broken for L4D2 if they are in a vpk. Until Valve fixes it (which was supposed to be fixed 6 weeks ago), you're going to have to use mp3s.
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Return to Audio

Who is online

Users browsing this forum: No registered users