Converting .wav stems into .ogg is only half the optimization win—if your game engine imports a 4-minute OGG soundtrack with Decompress On Load, it silently inflates a 3.5 MB OGG back into 42 MB of uncompressed RAM on launch. Conversely, streaming a 0.2-second gunshot off disk causes audible trigger stutter on low-end mobile devices.
Prepare lightweight, trimmed OGG assets locally in our WAV to OGG Converter or start from tuned targets in Game Audio Presets.
Engine Import Configuration Matrix: Godot 4 vs. Unity vs. RPG Maker
| Setting / Asset Type | Godot 4 (AudioStreamOggVorbis) |
Unity (AudioImporter) |
RPG Maker MZ / MV |
|---|---|---|---|
| Native OGG Support | First-class (AudioStreamOggVorbis) |
Imports OGG/WAV; re-encodes to Vorbis/ADPCM on build | Native .ogg required (MZ uses .ogg only; MV uses .ogg + .m4a) |
| Short SFX (< 2 sec) | Keep WAV (uncompressed PCM) for zero-latency polyphony | Load Type: Decompress On Load, Compression: ADPCM or PCM | .ogg Vorbis 96–128 kbps mono/stereo (keep trimmed tight) |
| Long BGM / Ambience | OGG Vorbis (128–160 kbps), loop = true, loop_offset |
Load Type: Streaming, Compression: Vorbis (Quality 60–70%) | .ogg Vorbis 128–160 kbps with LOOPSTART & LOOPLENGTH tags |
| Voice / Dialogue | OGG Vorbis 64–96 kbps mono | Load Type: Compressed In Memory, Vorbis Quality 50–60%, Force To Mono | .ogg Vorbis 64–96 kbps mono |
| Seamless Loop Tagging | Inspector Loop checkbox + Loop Offset (seconds) |
AudioSource.loop = true (avoid MP3 source files) |
Vorbis comments LOOPSTART and LOOPLENGTH (in exact samples) |
Godot 4 Audio Import Workflow
Godot 4 draws a clean line between WAV for instantaneous SFX and OGG Vorbis for music and ambience:
- Drop
.oggmusic intores://audio/bgm/: Select the file in the FileSystem dock and open the Import tab (or double-click for the Advanced Import Settings dialog). - Enable Loop & Set Loop Offset: Tick Loop and enter
Loop Offset(in seconds) if your song has an intro bar that plays once before looping the main chorus. Click Reimport. - Keep UI & Rapid-Fire SFX Compact: If you use OGG for medium-length dialogue or 5-second ambience beds, encode at 96–128 kbps (mono for positional cues) to slash
.pckexport size for itch.io and WebGL HTML5 builds.
Unity AudioImporter Workflow
Unity re-compresses imported audio during platform builds, which leads to a critical rule: never double-compress if you can avoid it—or understand what Unity does on import:
- For Archival Studio Projects: Import lossless WAV into Unity and let Unity's Vorbis build compression target Quality
60–70for music (Load Type: Streaming) andADPCMfor short SFX (Decompress On Load). - For WebGL / Addressables / Light Git Repos: Pre-converting bulky 24-bit WAV voice banks to clean OGG shrinks repository bloat dramatically. In the Inspector, enable Force To Mono on 3D footsteps and UI effects, and set Sample Rate Setting to
Preserve Sample RateorOptimize Sample Rateconsistently at 48 kHz. - Avoid RAM Spikes: Never leave 3+ minute OGG music tracks on
Decompress On Load—always switch them to Streaming so RAM usage stays under a few hundred kilobytes.
RPG Maker MZ & MV Custom Loop Workflow
RPG Maker MZ dropped legacy .m4a duplication and runs cleanly on .ogg across Windows, macOS, mobile, and browsers (RPG Maker MV still requires paired .ogg + .m4a files for Safari).
- Encode BGM at 44.1 kHz or 48 kHz, 128–160 kbps OGG Vorbis.
- Add Sample-Accurate Loop Metadata: For intro + looping chorus tracks (standard in JRPG boss battles), attach two Vorbis comment metadata tags:
LOOPSTART: exact sample index where the chorus loop begins (e.g.,480000for 10.0 seconds at 48 kHz).LOOPLENGTH: exact sample count of the looping section (orLOOPENDif supported by your plugin).
- Test Loop Boundaries Immediately: If you hear a pop at
LOOPSTART, inspect zero-crossings with our Sample Rate & Seamless Loop Click Troubleshooting Guide.
Compare Formats Before Locking Your Audio Pipeline
Still weighing WAV vs. OGG vs. MP3 across desktop, mobile, and browser targets? Read WAV vs OGG vs MP3 for Games or our complete WAV to OGG Encoding Guide.