ogg decoding performance

Thomas Eder Thomas.Eder at nmi.at
Fri Jan 10 10:02:23 EST 2003


I am just trying to evaluate if it makes sense to use ogg instead of wav
for loading external sound files.

But to decompress/decode an ogg using SDL_sound seems 
to need very much time.

Example (PC W2K, 1Ghz).
source wav: 5660KB, 22kHz, 16bit, Mono
created ogg from this wav (Quality 5): 856KB

Time to decompress/decode this ogg: about 30 seconds!!
(e.g. using Sound_DecodeAll() or playsound.exe --predecode).

I cant use streaming, because I need multiple sound channels and
therefore I am using SDL_sound+SDL_mixer.
And this combination doesnt allow streaming up to now, right?

So its even a lot faster to load the uncompressed wav from the CD than
loading the ogg+decompressing it!

I also noticed that the oggdec utility (www.vorbis.com) needs about
1.5 seconds to decode the same ogg above. I have used the latest
ogg-dlls with playsound, so it seems the bottleneck is the decoder 
in SDL_sound, right?

Any solution?
I am using SDL_sound 0.1.4, is SDL-1.0.0 decoding faster?
Or has someone better experiences with MP3?

Please send me some feedback,
thx,
Thomas










More information about the sdlsound mailing list