[vorbis-dev] #include scheme in vorbis project
xiphmont at xiph.org
Wed Oct 10 10:36:57 PDT 2001
On Wed, Oct 10, 2001 at 05:40:45PM +0200, Erik Olofsson wrote:
> I'm trying to implement vorbis into our game engine as a substitute to mp3
> and wma encoding. And I have some questions/suggestions in how #includes are
> done in vorbis.
> Right now ogg and vorbis stuff relies on ogg and vorbis include paths being
> in global (or local) include path environment. This could easily be avoided
> by using relative includes in vorbis:
> #include "..\..\vorbis\include\vorbis\codec.h"
> instead of
> #include <vorbis\codec.h>
...bad idea from the flexibility standpoint. <vorbis/codec.h> is
correct usage. The compiler should find local includes from -I or
equivalent. It would also make it impossible to use alternate include
paths in other testing.
(For one, your example would break my vorbis module checkouts which
are not in a toplevel directory named 'vorbis'. I tend to have five
to ten differing versions checked out at a time).
> This allows the include of vorbis and ogg .h files to be more plug and play
> and you can add the .c files of the library directly to a project without
> defining extra include paths. This is especially important in large
> projects. Right now its pretty easy for me to just modify the code in ogg
> vorbis to work this way, but it seems unnecessary. Is there a really good
> reason that you have it the way it is right now?
Yes. :-) Use the power of your compiler.
> Also if the test of vobis codec works out ok here I may be able to
> contribute with optimizations in the form of SSE code and so on, has this
> already been done / is in the process of being done. Is this something that
> you are interested in?
We're interested. People here have dabbled with optimizations for
various platforms, and it's a good idea to discuss optimization work
with the list before submitting a patch. Especially in the core libs,
simply showing up with a patch could conflict with other ongoing work
(which is unlikely) and to make sure it doesn't violate anyone's sense
of abstraction aesthetic (namely, mine ;-).
--- >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-dev-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-dev