[vorbis] Audio Section - Game Programming Gems 3

Alen Ladavac alen at croteam.com
Fri Nov 9 01:05:49 PST 2001



Hello Dave,  (gee, this sounds spooky ;) )

> 2) Compared to MP3 implementations, the current Vorbis implementation
takes
> gobs of memory up (at least around 500k per decoder instance last time I
> checked). MP3 requires maybe only around 50k. In a typical game, we may
want
> to play 2, 3, or 4 compressed audio streams at the same time. So with
Vorbis
> we might be hitting 2 megs of memory use, with MP3 we are hitting only
200k.
> On consoles, we don't have much memory, so having to use 2 megs is counter
> productive to using compression at all (one of the big reasons is to save
> RAM).

Ok, this might be completely off-track, and I am probably completely wrong,
but I have a strange feeling in the back of my head.... Is that memory usage
dependent on the size of the stream? Have you tried with very small streams
(a few seconds) ? How exactly did you measure the memory usage? By checking
difference before and after opening a decoder, or by calculating it
manually?

> 3) Being able to easily vector out standard lib functions would be a good
> thing.
[snip]
> What I might suggest is making
> it all vectored, then providing a function such as
> "vorbis_vector_to_standard_lib()". This would fill in the vectors with
what
> is used now.

Why don't you create wrapper stubs for stdlib functions? I mean, if you
don't want to use the stdlib functions and you don't link with them, I guess
you must have your implementations, right? So wouldn't it be easy to just
make wrappers that are named exactly as stdlib functions and that call your
functions, then liknk with your wrapper library instead of the stdlib?
It is same effect as doing vectorization, it requires approximately the same
effort on your side, yet it doesn't require a single line of code changed in
vorbis.
What do you think?

Alen

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list