[Tremor] adding hooks to vorbis-tools to link against tremor library

Chris Gorman chrisgorman
Wed Aug 4 11:33:59 PDT 2004


Hello All,

I have recently hacked the vorbis-tools module to link and build with the
tremor libvorbisidec library rather than libvorbis.  The work was based
upon the netbsd port called tremor-tools by lukem at netbsd.org.

While changing the ogg123 code to use vorbisidec, I thought it would be a
good idea to add this functionality permenantly based on the processor
architecture.  Specifically, if we are building for a target without a fpu,
we should use the tremor library for ogg123 and possibly oggdec and not
the floating point library.   I was going to try to add an additional patch
to the debian arm vorbis-tools package, but then thought it would be a
better idea to get this included into the mainline version instead.  Is
there interest in making some changes to vorbis-tools to allow for this?

Initially I thought about simply including something like

#ifdef __arm__
#include <tremor/ogg.h>
#include <tremor/ivorbiscodec.h>
#include <tremor/ivorbisfile.h>
#else
#include <ogg/ogg.h>
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
#endif /* ifdef __arm__ */

into the code and making the changes that way.  However, I have received
some recommendations that to avoid cross-compilation issues it is better
to use autoconf or place a uname -a in the makefile and perform the
conditional branching there.  The makefile modification strategy would be
fairly easy, but I believe this would mean making copies of the files
which need modifying and conditionaly compiling those files if we were
building for arm, and not if we weren't.  My concern with doing this is
that future modifications would need to be done to both the integer float
version of the file eg. vorbis_comments_int.c and vorbis_comments.c.  And
that developers might forget to update the integer files since the code is
largely duplicated.

eg.

if (`uname -m` -eq 'armv4l')
files = foo_i.c bar_i.c bas_i.c
else
files = foo.c bar.c bas.c
fi


I am not quite sure how to accomplish this with autoconf as I have only used it
sporadically, but doubt it will be too difficult.  Does anyone have any
recomendations on wether or not xiph would like to do this, and if so how?

Thanks

Chris Gorman





More information about the Tremor mailing list