5 ms·
It takes CPU to decompress audio, and games can easily be playing 100+ SFX at once.
by jblow 10y ago
It takes CPU to decompress audio, and games can easily be playing 100+ SFX at once.
- bitwize 10y agoSo load the clips from disk and pre-decompress them before firing the main engine up.
- striking 10y agoOr decompress them on level load or otherwise idle time.
- eropple 10y agoThis increases load times. Load times are already The Devil(tm). Disk space is cheap. Player time isn't.
- striking 10y agoThe neat thing about audio is that you can stream it in. Decompressing the most important sounds right at the beginning of the load screen for a scene or before the last one ends, and then streaming in the rest, would probably work well enough. (and sandbox games have idle zones and low-CPU times, so that's when you can do that.) Players don't expect much from load times anyway. And, no, my time as someone who plays video games is much cheaper than today's SSD storage. I wondered a few days ago why my Windows disk was so full. Video games. Literally 50% of it was video games. If I could save a couple GB on that, I'd be willing to give up a couple more seconds on every level reload.
- khedoros1 10y ago> And, no, my time as someone who plays video games is much cheaper than today's SSD storage. Flash storage is cheaper than it's ever been, and my time means more to me than it ever has. If I could spend a few dollars to have more gigabytes of fast storage, that sounds like a bargain.
- striking 10y agoTo upgrade my storage capacity, I can... double my SSD space. Which costs $100 (from 256GB to 512GB). That's the equivalent of upgrading from an RX 480 8GB to an nVidia GTX 1070 8GB. I don't know about you, but I have better things to spend money on than storage that could otherwise be slightly further compressed. I'd rather wait a couple seconds longer and burn my money on upgrading the graphical fidelity of my machine. Better yet, I could buy 3-10 games on Steam on sale for that money. Do you still think that's a worthwhile upgrade? Or would you rather wait another 3 extra seconds for every level reload in your game? If you have more money than time, you could always disable compression. My problem is that I can't enable any sort of good compression and I'm broke.
- khedoros1 10y agoWe're obviously at different places in life. I'll always go for the larger storage options, for reasons of time and convenience. The cost is reasonable, and I'll get the benefits for the entire time that I have the hardware. 3 seconds extra between levels, plus 20 seconds during the initial engine load, plus 5 seconds closing down the app, etc...Time adds up. If I've got half an hour available to play a game, I want to get in+out fast. My SSD can stream data faster than my CPU can decompress it. Why would I want to handicap the hardware that I paid good money for? On the other hand, 15 years ago, I remember shifting data around to fit on my 20GB hard drive, doing the minimum install and running games from the CD to save disk space. My priorities would've been a lot different, then.
- eropple 10y ago> The neat thing about audio is that you can stream it in You can stream music. You cannot stream effects; the timing of effects is such that you can't afford a frame's delay or people will notice it's off-kilter. And, as it happens, effects are precisely what are loaded uncompressed; almost every game engine's streaming-music feature uses MP3, OGG, or whatever.
- izacus 10y agoSound effects are almost always streamed in - remember, most of modern games are built for consoles as well, which have significantly less memory storage. Hence lack of compression - it lets you stream in audio from a spinning BR directly without spending more CPU power.
- eropple 10y agoThat could be the case on consoles, but I've never seen an engine that didn't strongly recommend preloading triggered effects on platforms with a RAM budget.
- striking 10y agoOften you can predict what effects your scene will need. Sometimes you can't, and in that case you can't compress. But it's entirely possible that you could decompress some of that audio into RAM beforehand if you're not confident every device can play that audio compressed immediately. Or store back a cache file temporarily. Or just not even worry about the CPU because the vast majority of users are GPU-limited rather than CPU-limited.
- michaelmrose 10y agoThat disk space is still worth 18 bucks on a ssd between 1/3 and 1/4 of the purchase price of the game new. This isn't an inconsiderable sum. Also cpu time to decompress audio is microscopic it might actually be faster especially if the consumer has a hard drive to read 1/10 of the data and decompress. Additionally there is probably a smart middle ground between keeping the data as small as possible and 50GB of raw audio.
- eropple 10y ago> That disk space is still worth 18 bucks on a ssd between 1/3 and 1/4 of the purchase price of the game new. This isn't an inconsiderable sum. To me it is. I delete games when I'm done with them. The disk is reusable.
- deleted 10y ago[deleted]
- marcosdumay 10y agoDoes it? Load time is normally IO bound, not CPU. If your game has the typical IO bound loading, compressing stuff will make it load faster not slower.
- deleted 10y ago[deleted]
- daemin 10y agoIt is IO bound, but it is also CPU and memory bound as well. I say this because most of the loading a game does is while it is running. This is especially true for large open world games (and others to varying degrees), where sections of the world (including geometry, textures, audio, music) are being loaded and unloaded all the time. Given this is happening while a game is running, it means that the loading code has to compete for CPU and memory with all the rest that is going on in the soft realtime system that is a game.
- yyhhsj0521 10y agobut downloading ~50GB of files would take hours or even days for some users.
- deleted 10y ago[deleted]
- jdhawk 10y agoReally, I thought all the basic decompression was handled on silicon by the "sound card" now, integrated or not.
- khedoros1 10y agoMy sound hardware seems to have the bare minimum of ADCs, DACs, and headphone detection pins to get the audio signals in and out. The drivers that do all the heavy lifting, decoding, conversion, etc on the CPU. Why do the decoding on comparatively expensive custom silicon, when you've already got a fast and flexible CPU?
- avisser 10y ago> Why do the decoding on comparatively expensive custom silicon, when you've already got a fast and flexible CPU? Not a reason, but I haven't payed attention to sound cards since my Creative SoundBlaster 16. I assumed that some amount of progress/feature-creep had been made on them. If you told me I would've believed that every sound card these days had an embedded mp3 decoder as well as some 3d audio components.
- khedoros1 10y agoYou can still get discrete hardware that does a lot of that: offload of decoding compressed audio, adding effects, 3D positioning calculations, hardware equalization, etc. Most people don't bother; I think that having a "real" sound card is kind of a small niche market right now. Going back about 15 years ago: https://en.wikipedia.org/wiki/Sound_Blaster_Audigy https://en.wikipedia.org/wiki/Sound_Blaster_Audigy I've got some version of that series of cards sitting in my closet. I feel like that's about when sound cards really peaked. The hardware was mature, CPUs weren't fast enough to generate all the effects games wanted on the fly, surround sound was popular, etc. It made a lot of sense to offload that stuff to an external card. Compare that to now: I've got some Chrome tab doing audio decoding, but my task manager reports 0-1% CPU use for each of my tabs. Audio decoding is fast enough to be done easily on the CPU. Ditto for the effects and such that are in use now. The equation shifted.
- 10y ago
- izacus 10y agoIt's very common to have compressed audio on e.g. Xbox One, and uncompressed audio on PS4 and PC. While it might make sense for consoles where you need every last ounce of CPU power and have the audio stored on 50GB Blu-Ray, on PC it's usually just a leftover from the console world.
- rorosaurus 10y agoAdditional context: the game he was referring to was probably Titanfall (the first one), which had ~50GB of uncompressed audio. This included audio for every language it was localized for, which was surely unnecessary at runtime.