[vorbis] Audio Section - Game Programming Gems 3

Michael Smith msmith at labyrinth.net.au
Thu Nov 8 05:24:37 PST 2001



>One final suggestion ... remove all use of standard libraries ... get the 
>decompression libs to stand on their own without linking to anything else. 
>This greatly simplifies their integration into our projects under Win32 
>since there's so many options for linking with the standard libraries, and 
>everything you link to needs to use the same method. This means you'd have 
>to rely on the callback functions as the only method for playing back a 
>file, but some decent sample code makes that a non-issue.

This isn't going to happen - libvorbis needs the standard libraries for
a variety of things that it's not only painful to reimplement, but downright
stupid for most uses (i.e. NOT games), such as:

  - memory allocation. We don't want to force a custom allocator on people.
    It's easy for people to drop their own allocator in if they want, but
    we couldn't do that portably.
  - mathematical functions (the stuff in <math.h>) - platform versions are
    typically nice and fast. Not too much fun to reimplement regardless.
  - misc. functions like memcpy() and so on - easy to reimplement, but
    another thing to go wrong. And again, platforms typically have nice
    optimised versions of these. 

Whilst none of these are insurmountable for someone who NEEDED to remove
use of the standard libraries, doing so for the 'normal' case would be
a really, really bad idea. Merely removing the FILE * based stuff in 
vorbisfile.c would be simple, but is a LONG, LONG way from being enough
to get rid of the standard libraries. 

Michael

--- >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