Hi, it's me again. Just wondering, which format would you recommend for storing audio in a computer game? I want something that doesn't sound terribly compressed and doesn't take up a whopping amount of space. I thought about .OGG but I wasn't certain.

.OGG wrote:This format has been getting a good bit of attention lately. The format hasn't been widely used yet, but it is catching on. You can find information for developing with the Ogg Vorbis format at ( http://www.xiph.org/ogg/vorbis/download.html ). Here you can use links to find the files you need. You can get the Win32 SDK and a few other useful files.

This utility takes audio files and lets you drop them into the window and converts them to the .OGG file for you. You can change parameters for the application, and I played around with the quality settings to get a good balance between quality and size.

I first set the quality setting in the utility to 1.0 as someone had suggested to me. The quality was ok, but I could tell that it wasn't anywhere close to the original. I played around with it until I got a suitable sound at quality setting 2. The .OGG I got was 2.99 MB and sounded good! Very cool.

As a note about the previous version of this article, I was using Sound Forge to convert to the OGG format and at that time the best compression for the OGG file was a bit higher than an MP3, but using the utility from the site, presumably much newer, I got this decrease in size.

Bottom Line- Best compression found in this experiment for song quality audio. Some neat utilities can be found on the site to help you convert your songs to the format without having to write code to do it yourself (always a plus).

Thanks guys, I heard about .OGG awhile ago, and since a lot of game developers use it, I figured it would be a safe bet. As for .FLAC, Game Maker(What I use) doesn't support it, although their may be a plugin for it somewhere.

Dr. Coconut wrote:Thanks guys, I heard about .OGG awhile ago, and since a lot of game developers use it, I figured it would be a safe bet. As for .FLAC, Game Maker(What I use) doesn't support it, although their may be a plugin for it somewhere.

I agree with the people recommending OGG. Royalty-free*, and close enough to CD quality for most purposes even at modest (~160) bitrates. If you're willing to sacrifice a little more quality, you can crank the rate down even lower. The compression artifacts it introduces at lower bitrates aren't as objectionable to most people as MP3 compression artifacts; e.g. it is less susceptible to the weird whooshing/underwater effect MP3 is known for. I would still call it roughly "FM radio quality" even at 96 kbit/sec.

*Yes, I know there are free MP3 encoders (e.g. LAME). But IIRC anyone who uses MP3 format without getting the appropriate licensing from Fraunhofer is *technically* in violation of their patents. Of course nobody is going to care if it is for personal use; but if this is for a product which you may want to distribute commercially, licensing is a consideration.

The years just pass like trains. I wave, but they don't slow down.-- Steven Wilson