by nub on Sat Nov 30, 2013 8:11 am
WAV is uncompressed, therefore "lossless" in audio fidelity, but the file size is huge. MP3 is compressed, therefore "lossy" in audio fidelity, but the file size is much smaller.
You can certainly use WAV for everything, but for full-length songs the file sizes will be huge. The file sizes for WAV files are mainly determined by the length of the track. The longer the sample, the larger the file size. There's alternative lossless formats available, but they aren't supported by Source, let alone probably 99% of all the other games out there. FLAC for instance is an extremely popular alternative to WAV. It's much more efficient in file size while maintaining a lossless quality. MP3 uses compression in order to create small files. Not only is the length of the track a factor in file size, but so is the audio bitrate. The higher the bitrate, the better the audio quality and larger the file size; and vice versa. There are probably other factors at play, but I'm not that informed in this area.
If you're composing your own music, I personally suggest rendering it out at a bitrate of 320 kb/s, or close to that at least. That way you will have good audio quality without the absurd file sizes. In the middle of a game, the audio fidelity isn't going to matter nearly as much as it would if you were listening to just the music with a pair of high end headphones or speakers. You might be able to get away with lowering the bit rate a notch below 320 kb/s before the quality is noticeably low; if you're that worried about file sizes.
Valve's method is that all music is MP3 (unsure of bitrate, but I don't think it's 320 kb/s), and all the physics and environmental sound effects and whatnot are WAV. I believe all the character dialog is WAV as well. Don't quote me on that though. I imagine something that important would be lossless quality.
Source's audio system is rather outdated if I recall. A lot of the more modern titles out there are using the FMOD sound system, which is designed specifically for game engines and such. I think OGG is a popular file format for games as well. I believe it's similar to MP3, but more efficient and capable of lossless quality or something. Again, I'm not 100% sure about this.