2020-01-11 21:27:14

Hi all,

I am interested to hear your thoughts on lossless audio compression for audio games. For those of you who do not know the difference, let me explain briefly.

Uncompressed audio is usually stored as .wav files; this is the Microsoft format that is most commonly used to store raw audio data also known as PCM. These files are rather large. For CD quality stereo audio, one minute of sound takes about 10 MB of storage space.

Most games will use some sort of lossy compression such as Vorbis, Opus, or MP3. When you use lossy compression, parts of the audio that the encoder expects that most humans will not hear, are removed in a clever way to save space. So when you play back a .mp3 or .ogg file, you will be listening to a version of the original Wave file with reduced audio quality. This reduction in quality is irreversible.

There are also so called lossless audio compression schemes. The one I like the best is called FLAC. When you compress a Wave file into a lossless format like FLAC, the .flac file is smaller than the .wav file but not nearly as much as it would have been had you used lossy compression. However, when you play a FLAC file, you will be listening to what amounts to a perfect copy of the original Wave file. There is no reduction in quality whatsoever.

If you use a high bitrate for a lossy format such as Vorbis, most people will not notice a difference. But there are audiophiles like myself who do enjoy the idea of having lossless audio, even if it takes more space on disk.

Here are some approximate figures for a small set of audio files that I tested.
Wave: 50.5 MB
Vorbis at quality 6: 7.6 MB
FLAC: 28.5 MB

What do you think? Would you like to see a game with lossless audio, or do you consider the space savings to be more important than the audio quality?

To be clear, this is for PC games. For mobile games, I think lossy compression is a must for now.

Kind regards,

Philip Bennefall

2020-01-11 21:33:08

Depends on the kind of game, but in general I think lossless audio with high bitrate is good enough for most things.

2020-01-11 21:51:25

As I am a sound desiigner and musician losless is the best option. Video games are aiming for high quality graphics most of the times and I believe audio games should have the best audio as possible including great quality, not just good audio samples.

Twitter
Add me on Steam
Discord: lirintheblindguy
BattleTAG: Lirin#21759

2020-01-11 21:52:56

I wfor one would love lossless audio in a audio games.  The sound would be worth the space loss for sure.  Experience the way the sound was ment to be.

Their is no such thing as a master.  One is never done learning, and those who claim to be a master at something are far from becoming one!!

2020-01-11 21:54:15

Well. I don't think I would be able to hear the difference in a game, so it doesn't matter much for me.

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2020-01-11 21:59:20

Same as @5.
I have never been able to detect any difference, so I'd prefer a smaller size. Sounds are often the biggest part of a game.

2020-01-11 22:19:44

I don't think I've ever heard a good example of the difference, and as I don't believe that I have a DAC that would support it, it may be lost on me.

A winner is you!
—Urban Champion

2020-01-11 22:47:02

Huh. I was not expecting to be one of the few "yeah, flac needs more love" responses. Even though I do like smaller file sizes, personally do not need hyper "realistic" simulation-quality content, etc, I also don't like destroying information. I kinda wish flac was much more common for that alone.
Also, license shenanigans.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2020-01-11 22:49:53

hell sighted are dieing to get bigger screens and shit for more real experience, so why not us, the better quolity, the happier i m

2020-01-11 22:56:13 (edited by jack 2020-01-11 22:59:59)

For sounds/audio environments, I'd say lossless all the way. If people don't like it they can get a larger hd and more ram, sata-based ssd's are becoming more budget-friendly with the advent of pciE-based drives. AS for ram/cpu it's all based on the machine you get nowadays for in the case of laptops. The reason I bring this up now before someone can say, but my flee-market machine... is because just like the whole windows xp fude, there are going to be the folks that may object that either have their 4gb ram windows 7/10 machines, or still have their machine that got the free upgrade to windows 10, and I for one would not be able to do much comparison between lossy vs lossless audio handling unless I brought out my old Pentium t4300-based machine with an hdd. At least if audio games are to be potentially brought into 64bit land for more abstract audio environments (look at City of Flesh as an example of high-resource yet great audio handling, then we are going to have to start raising the bar for system requirements along with the video gaming industry (minus the gpu requirements of course).
Regarding audio handling, Three-D Velocity handled it in a bit of a hybrid though not a one-size-fits-all. All of the sounds of the game were in wave, and the long cutscenes were ogg. A game of the present could use a combination of wave and flac (wave for smaller audio/game sounds and flac for longer bits) or go flac-exclusively.
@CAEJones re: licenses, flac does not need royalties. Hell, Fraunhofer IIS stopped collecting royalties for mp3 in 2017, so the era of privately owned codecs, at least for your standard-issue audio, is definitely behind us.

2020-01-11 23:18:51

I would love a world where lossless 24 bit, at least 96K audio was the standard in gaming, but that would require pretty expensive hardware to even be able to hear the difference, assuming your ears were even capable (some people can't tell the difference).
In a slightly related note, I wonder if audio games could ever leverage the GPU to do HTRF computations for audio, so that we can actually make use of that processor the way sighted people do? Then we could have amazing audio that's handled by a secondary processor, allowing the main CPU to handle other aspects of the game. There are definitely ways to get the GPU to pull its weight (such as in bitcoin miners and other scientific applications), so if we could ever bring this to the world of audio gaming, I think it'd open up a vast world of computing power where we could process environments, characters, objects, and everything that might produce an audio in beautifully rendered 3D audio, all without bogging down the CPU that could be used to be doing other game operations.

Kai

Spill chuck you spots!

2020-01-11 23:44:49

@Zoren: With the NVidia gtx1650 with 4gb of dedicated memory shipping with some higher end laptops, that isn't a very tall order, as long as we can trust people to make the proper judgement call when buying machines. This dell xps15 7590 with 16gb of ram and the core i7 6core hyperthreading cpu was around $1700, and the mac population probably knows better than anyone that so-called entry-level macs are sold at close to the same price and don't have nearly as much going for them.
Regarding hardware, fortunately the software-hardware audio landscape is changing ofr the better. This machine comes with Waves Max audio pro and some good speakers, capable of running asio drivers and complex reaper setups, and virtual surround is becoming powerful enough that Waves can pump an Abby Road Studio studio monitor setup through a pair of headphones. So gpu-powered hrtf doesn't seem too far fetched.

2020-01-11 23:50:45

I dislike Waves Maxx so much... it must just  my crappy computer that I got, but it runs awfully and doesn't seem to be completely accessible.

A winner is you!
—Urban Champion

2020-01-12 00:51:49 (edited by burak 2020-01-12 00:52:23)

Hello,
I don't have the good ear that is required to separate a lossless compressed audio from a lossy compressed audio file. So for me it does not matter at all, if there wouldn't be the quality loss truth I'd say lossy compression would be more benifitial in the way that it results in smaller audio files. Of course, the matter changes when it comes to unpacking those lossy compressed files to edit them.

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2020-01-12 01:19:15

Hi. Personally, I'm all for lossless audio in games. I don't think hard drive space is an issue any more, and I would rather have better sounding audio than smaller files

I live in darkness, forever in darkness.

2020-01-12 01:28:46

@Iceguard: Hard drive space is not as much an issue, only for a small minority of people still on hdd's or t100 netbooks. Ram/cpu is more the issue, with a lot of people still using 4gb ram and duel core cpu's.

2020-01-12 02:05:23

I for one like my storage, and appreciate compact, efficient games.
The more giant wav-based things I install, the more I have to juggle at backup time, and the more money I have to pay for the resources to manage those giant products (larger storage devices, faster upload rates, etc).
Particularly since a good codec at decent quality levels will make the difference pretty much academic, I'm all for compressed audio.

2020-01-12 03:09:36

@16 true, but personally I would be willing to use my hardware resources for that. As for other people, that's up to them to decide

I live in darkness, forever in darkness.

2020-01-12 03:29:06

@John: Fair point. Flac is fairly new, and a lot of players carry experminetal support. Right now its space is half that of wave. Ogg did the space conservation game well while not losing as much quality as mp3. If and when flac improves they'll probably be able to bring the space down even more, considering mp3 is no longer an officially supported/licensed standard.

2020-01-12 03:41:24 (edited by Ethin 2020-01-12 03:42:09)

HRTF on the GPU is definitely possible already. The difficulty is writing the shaders necessary to do that. I never thought of using the GPU for audio processing... what a novel idea.
The main issue is the shaders. To send code to the GPU you have to give it a shader, which means you need to pull in a hole graphics library. That's not too bad of a dependency, since every OS nowadays has one. The shader, on the other hand, will be a tad more difficult. The language is quite limited i what it can do...
While it would be awesome you'd be putting the extra job of learning graphics programming onto audio game developers shoulders too, and graphics programming tutorials usually don't teach you how to do compute pipelines.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2020-01-12 04:26:18

Sorry for taking this a bit off-topic, but being the retro tech geek I am, I love experimenting with different ways of making audio as small as possible, especially back in the day when it had to be programmed into a tiny ROM chip. As far as I know the first talking device of any kind with no moving parts except for the speaker was the TeleSensory Speech+ talking calculator which came out in around 1976. While it's true that it had a vocabulary of about twenty-four words and the speech was completely monotonic and weird sounding by even the standards of the early 80's, they managed to get those twenty-four words into, if I'm not mistaken, a two-kilobyte ROM. That's right, 2,048 bytes.

2020-01-12 07:29:28

I'm all with jaybird here, we could do so much, with so little, with out sacrificing quality or storage. I'm also a fan of the retro things. Nice to hear that someone knows about that old calqulator!

My chiptune archive is https://chiparchive.com/files/.
And the new sync key is
BQHTXTVRWGMFSI3BI3ZVQ4TGEOGNJJO64
Twitter is https://twitter.com/thechiptunearc1?lang=en

2020-03-30 05:14:26

I'd like to weigh in here. I'm a little late to the party, but I love flac and would love to see lossless audio in an audiogame. The differences for me are subtle, but I can definitely tell when audio's been compressed. As I say, it's subtle and it's not a giant leap, but in music, for instance, drums, especially symbols have that little extra bit of crisp, and other small nuonces.
I think it'd be awesome.

2020-03-30 06:45:12

I also agree that lossless sounds better and the storage space requirements for lossless audio are quite reasonable these days. The problem I have with lossy audio isn't so much that it isn't the original. My problem is that lossy audio may show its weaknesses in certain situations eg. slowing down an mp3 or an ogg file reveals weird birdy artifacts in the high frequencies sometimes. Or a perfectly good loop in a wav/flac file may all of a sudden develop a click when compress to ogg.

If you're going to use hi res audio (24 bit, 96 khz or beyond), lossless is the only sensible choice, since lossy codecs strip away much of the extra resolution. One could argue that nobody will ever hear the difference, and that may be true. However, processing such as filters, eq, distortion, and especially pitch shifting, all sound better with higher resolution data. While any decent processor should cope with normal resolution well enough, quality can vary a great deal especially when doing heavy processing.

In the end, I think it is truly up to the developer. If they're making a game that doesn't need fancy processing and they aren't as anal as I am about quality, a lossy format with a decent bit rate will do. If they are concerned about file size, a lossy format with a decent bit rate will do. It's also a good idea to keep in mind that lossy vs. lossless isn't a binary choice; the main sounds of your game can be lossless while background elements are lossy. There's really no one-size-fits-all.

I myself would be very interested to know of any games using flac or opus for their audio. Opus sounds really good even at 96 kbps (that's less than 1 mb of audio per minute), and lower bit rates still sound acceptable, though with some noticeable artifacts. From what I have read, formal listening tests have found Opus to be the best-sounding codec for low to mid bit rates at least, and maybe high ones as well. So I would strongly encourage anyone considering lossy audio to look into opus first. It really is the best right now.

Even though I'm a proponent of lossless all the way, I have to realize that consumers, including myself sometimes, tend to be very tolerant. Lossy compression is good enough now that it will work in 99 percent of cases even with modest settings. Still, lossless audio is by far a safer bet; you have nothing to lose but storage space, which can be recovered if the need arises, but you can't go the other way 'round and start with lossy data then reverse the loss. I think a good strategy would be to always be working in lossless on your local copy, that way you aren't taking any risks with the quality of your sounds. Just before a release, decide whether lossless or lossy is what you want your release to be. If the file size of lossless is fine, keep things as is. If lossy is the only way, make a lossy copy and release that, but go back to lossless when you continue working on the project to keep everything clean.

Make more of less, that way you won't make less of more!
If you like what you're reading, please give a thumbs-up.