Shrinking WAV audio into OGG for games and web projects
WAV and OGG in brief
WAV is an uncompressed container, so it is big and exact. OGG usually carries Vorbis, a lossy but open codec that makes files several times smaller. For shipped audio, that trade is usually worth it.
Why game developers like OGG
Download size and memory both matter in games. A three-minute WAV music track is around 32 MB, while an OGG version is a few megabytes. Vorbis is royalty-free, and engines such as Godot and Unity read it without extra licensing.
Let your engine do the job when it can
Unity can compress WAV to Vorbis during import, and Godot imports WAV directly. A good habit is to keep WAV masters in your project and export OGG only when you need a ready-made file, for example for a website or a tool that does not compress for you.
Looping needs a test
Lossy encoding can add a little padding at the start and end. Short sound effects are fine. For seamless music loops, listen for a click at the loop point. If you hear one, keep the WAV or use loop-friendly import settings.
Web audio notes
Browser support for OGG is not universal. If you are building a site for everyone, offer an MP3 or AAC fallback.
Keep a WAV master for every OGG you ship. Re-encoding an OGG later costs more quality than exporting a fresh one from the WAV.