[Vorbis] ov_open_callbacks() performance & memory requirements

Dave Brown dave at db-audioware.com
Thu Sep 14 07:55:05 PDT 2006


Hi guys,

I'm writing a sample playback engine using vorbisfile, but I've hit a
performance problem - hoping someone here can help!

I'm using ov_open_callbacks() to decode memory-based ogg files. It works
OK, but when I call ov_open_callbacks() approximately 300k of memory is
used (presumably to initialise the decoder). It also takes some time to
execute ov_open_callbacks() - the read & seek functions are being called
a huge number of times, even for a tiny 10k ogg file.

My sample engine needs to load a large number of small audio files. This
gives me two problems - first, it's taking too long to initialise all
those files with ov_open_callbacks(), and secondly I'm running out of
memory! For example, 100 x 10k files needs a thumping 29MB of memory.

Is there anything I can do to speed up ov_open_callbacks() or reduce
it's memory requirement?

Many thanks,
Dave.


More information about the Vorbis mailing list