Game Development Community

OGG vs. WAV - The Audio Debate

by Nicolai Dutka · in Torque Game Engine Advanced · 05/25/2009 (5:22 pm) · 4 replies

I need some feedback on the OGG vs. WAV audio format issue. Please provide your opinions on this matter. Also, some technical information would be wonderful! (Such as which can be played in 3D, etc)

I've been using OGG simply because of the much smaller file sizes, but my audio engineer was hoping we could use WAV because he claims it gives out a better sound quality.

#1
05/25/2009 (5:42 pm)

Audio quality: yep, Vorbis uses lossy compression so there is some compromise in sound quality.

Otherwise, in terms of internal resource usage it doesn't make much of a difference if you use WAV or OGG in TGEA. TGEA's SFX system stores all in-memory SFX in uncompressed form so both formats end up with the same data (minus stuff that OGG loses). However, for shipping a game, sounds need to be fairly short or WAV will be expensive.

If you wanted lossless compression, it would not be too much work to write a FLAC loader for TGEA's SFX system. It also uses the OGG container format. Don't have any experience with using that codec, though.

As for 3D, any mono sound will do. OGG and WAV are both fine. Makes no difference to SFX.

#2
05/25/2009 (6:25 pm)
WAV files are big ... OGG files are small ... to be honest, after testing both in-game (with Torque's standard audio) I can't really tell the difference.
#3
05/25/2009 (6:57 pm)
Coming from a musical background I have excellent ears, but for the most part for the types of sounds that you would expect to be hearing in a game the average person will not be able to tell that you've used a lossy format for your audio.

Either .wav or .ogg can be used for 3D sounds so long as it's in mono format (one channel). 2D sound (gui sounds, music, etc) can be stereo. And in the case of music (especially "real" non-midi, non-synthesized sound) if you wish to retain a high level of sound quality you might want to consider something like Rene's suggestion of an alternative loader. FLAC is great in that it has near-perfect sound quality and yet smaller than a .wav file, but is still considerably larger than an .ogg file.

In the end you have to weigh the merits of sound quality versus asset size, and how much of a sacrifice of each you would be willing to make, because I'll say it again: most people can't tell the difference anyway.
#4
05/25/2009 (9:11 pm)
If they're using integrated C-Media audio with a couple of $10 desktop speakers sitting behind their monitor, they probably can't tell the difference no matter how good their ears are. If they've got their X-Fi Elite Pro piped into their Bose Lifestyle V20 a deaf person can probably tell the difference.

So you'll also have to take into consideration the type of game and your target audience.

For casual games it probably doesn't matter much; they're not going to have their home theater system cranked up to hear jewels shattering.

For hardcore action games with lots of sound effects, explosions, and mood music you'll want to err on the side of higher quality, because the audio is a big part of the user experience.