Skip to content
Redmoon Calculators
← בלוג
· 8 דק׳ קריאה

How much disk will your game audio eat? The PCM math, explained

Voice lines and music are usually the biggest download in an indie game. Here is the exact formula for audio file size, why WAV explodes, and how much OGG or Opus actually saves you.

#gamedev#audio#indie#game-design

Textures get all the blame for bloated game downloads, but on a lot of indie projects the quiet culprit is audio. A few hours of voiced dialogue, a dozen music tracks, and a folder of ambient loops can quietly outweigh every sprite and 3D model you shipped. The good news: unlike compressed images, raw audio size is completely deterministic. You can calculate it exactly, before you record a single line, from four numbers.

This piece walks through the formula, explains why uncompressed WAV grows so fast, and shows what you actually save by switching to OGG Vorbis or Opus — so you can budget storage during pre-production instead of discovering the problem when your build won't fit on a mobile store's cellular-download cap.

The formula for uncompressed audio

Raw PCM audio — what a WAV file stores — has no compression at all. Its size is simply how many samples you captured, times how many bytes each sample takes:

bytes = seconds × sample_rate × (bit_depth ÷ 8) × channels

Every term is a design decision:

  • Sample rate — how many snapshots of the waveform per second. 44,100 Hz (CD quality) and 48,000 Hz (video/film standard) are the common choices; 22,050 Hz is fine for many game sound effects and voice.
  • Bit depth — how many bits describe each snapshot's amplitude. 16-bit is standard for delivery; 24-bit is a production/mastering format that you rarely need to ship.
  • Channels — mono is 1, stereo is 2. Dialogue is almost always fine in mono; music is usually stereo.

Divide bit_depth by 8 because there are 8 bits in a byte. Everything else multiplies straight through.

Why WAV explodes: a worked example

Take a very ordinary spec: 44.1 kHz, 16-bit, stereo. Per second that is 44,100 × 2 × 2 = 176,400 bytes — about 172 KB every second, or roughly 10.1 MB per minute. That number does not care what the audio is. Silence, a symphony, and white noise all cost exactly the same in PCM.

Now scale it up. Say your game has 30 minutes of stereo music at that spec. That is 176,400 × 1,800 seconds = 317,520,000 bytes, or about 303 MB — for half an hour of audio. A fully voiced RPG with several hours of dialogue would run into gigabytes of raw WAV, and that is before a single texture. This is why shipping WAV directly is almost always a mistake: you are paying full price for data that compresses beautifully.

What compression actually buys you

Lossy codecs throw away parts of the signal your ear can't easily distinguish, and the savings are dramatic. As rough delivery-size multipliers against that raw WAV baseline:

  • MP3 (192 kbps) — around 8% of the WAV size. Universally supported, a safe default, but not the most efficient modern option.
  • OGG Vorbis — around 7%. Royalty-free, well supported by most engines (Unity and Godot both handle it natively), and a common choice for game music and ambience.
  • Opus — around 5%. The most efficient of the group, excellent for voice at low bitrates, though engine support is slightly less universal.

Run our 303 MB half-hour of music through OGG at roughly 7% and it lands near 21 MB. That is the difference between an install users grumble about and one they don't notice. The tradeoff is that lossy codecs are decoded at runtime, which costs a little CPU — usually irrelevant on desktop, occasionally worth thinking about on constrained mobile hardware with dozens of simultaneous sources.

Choosing settings without over-paying

A few practical rules keep the budget lean without hurting perceived quality:

  • Mono your dialogue. A single voice recorded in stereo is just two nearly-identical channels doubling your file size for no benefit. Mono halves it outright.
  • Don't ship 24-bit. The extra depth matters while mixing, where you want headroom against clipping and quantization noise. In the delivered build, 16-bit is transparent for playback. Master in 24-bit, export in 16.
  • Match sample rate to content. Music and full-range effects justify 44.1 or 48 kHz. Speech and dull thuds often survive 22.05 kHz with no audible loss, halving their size.
  • Watch the mobile ceiling. App stores throttle or block large cellular downloads (Apple's over-cellular limit has historically sat in the low hundreds of MB). If your total compressed audio pushes past a gigabyte and a half, mobile users will feel it — trim, re-encode, or stream.

Budget before you record

The reason to do this math early is that audio content is expensive to change late. Once a voice actor is booked and lines are recorded at 48 kHz stereo, "actually we needed mono at 44.1" means a re-export at best and a re-record at worst. Deciding the format and sample rate up front, then multiplying out the total for your planned minutes of content, turns a possible late-stage crisis into a spreadsheet cell.

Our indie game audio file-size estimator takes your minutes of audio, target format, sample rate, bit depth, and channel count, and returns the total in MB or GB plus a per-minute figure — with a warning when the compressed total crosses the size where mobile players start to balk. Set it up once during pre-production and you'll never be surprised by the size of the audio folder again.

מאמרים קשורים

שלח משוב

אנחנו קוראים כל הודעה. ספר לנו מה ניתן לשפר או מה אהבת.