Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411485 Posts in 69371 Topics- by 58427 Members - Latest Member: shelton786

April 24, 2024, 07:35:00 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperAudioAudio format for SFX
Pages: [1]
Print
Author Topic: Audio format for SFX  (Read 887 times)
dawid w. mika
Level 0
***



View Profile
« on: May 29, 2015, 11:03:08 PM »

Hey!

Small nerdy question: what's the best format for SFX's inside game when the game is not using advanced middleware? TOgether with devs I'm considering .ogg but most of the games with such a simple audio system are working with .wav's. Is it because of cpu power needed to decompress them or is there any other reason?
Logged

Pete301
Level 0
***


View Profile
« Reply #1 on: May 30, 2015, 01:23:03 AM »

You hit the nail on the head.

Usually it requires a relatively smart way of decompressing before streaming the sounds if you want them to be synchronised when using compressed formats. Trying to stream directly from a compressed format is quite CPU intensive (depending on how many are being streamed simultaneously). Some people opt to use ADPCM because it is fast to decompress so it can work.

Though if you are trying .ogg and manage to get it to work for what you need I can't see a problem with it. Most games use a combination of compressed and uncompressed formats, for ambience and things that don't need to be accurately synchronised.
Logged
TopherPirkl
Level 0
***



View Profile WWW
« Reply #2 on: May 30, 2015, 11:57:50 AM »

To a point, target platform can dictate what you use; not everything decompresses .ogg or does it efficiently. If it's just Win/Mac, .ogg is fine. ADPCM may have the same kind of considerations, I don't know offhand what is handled by various platforms.

I will say from experience that .ogg tends to sound better than ADPCM, especially for high-frequency content, which is largely due to how ADPCM is encoded (the "adaptive differential" part of the abbreviation).

If you're talking about relatively short sound effects, I'd do your best to keep them in .wav format if possible. Since it's usually a percentage size reduction, you may not win back that much memory, and .wavs will always sound better. This is especially true of any voice content, since .ogg compression doesn't always sound very good on the human voice. And as a general rule, as in most areas of game design/software development, don't pre-optimize. There are plenty of utilities out there that can do batch conversion, so it wouldn't be hard to convert a bunch of .wav files to .ogg down the road if need be.

Ultimately it's a discussion to have with the rest of the team, which it sounds like you're doing. Pretty much any conversion option is going to be a tradeoff of memory vs. cpu.
Logged

Sound Designer | @phantomfreq | Demo reel
Sik
Level 10
*****


View Profile WWW
« Reply #3 on: May 30, 2015, 12:03:12 PM »

Sol uses OGG for everything, however sound effects are uncompressed when loading and kept like that in RAM, while background music is kept compressed in RAM and decoded on the fly while it plays.

Some people opt to use ADPCM because it is fast to decompress so it can work.

There's a Mega Drive sound engine that does ADPCM compression at around 22KHz on a 3.58MHz CPU. So yes, I can attest to ADPCM being fast =P
Logged
dawid w. mika
Level 0
***



View Profile
« Reply #4 on: May 31, 2015, 10:07:18 PM »

Thanks guys! The game is mostly about spreading havoc with guns so I guess we need to use .wav here but .ogg should be enough for ambiences and music.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic