Code shamelessly taken from netbsd tremor-tools. Ugly autoconf/libtool hack should be blamed on me. diff -urN vorbis-tools-1.0.1/configure.in vorbis-tools-1.0.1-tremor/configure.in --- vorbis-tools-1.0.1/configure.in 2003-10-23 09:56:36.000000000 +0200 +++ vorbis-tools-1.0.1-tremor/configure.in 2005-05-17 17:04:14.000000000 +0200 @@ -98,8 +98,8 @@ dnl Check for generally needed libraries dnl -------------------------------------------------- -XIPH_PATH_OGG(,AC_MSG_ERROR(Ogg needed!)) -XIPH_PATH_VORBIS(,AC_MSG_ERROR(Vorbis needed!)) +#XIPH_PATH_OGG(,AC_MSG_ERROR(Ogg needed!)) +#XIPH_PATH_VORBIS(,AC_MSG_ERROR(Vorbis needed!)) SHARE_LIBS='$(top_builddir)/share/libutf8.a $(top_builddir)/share/libgetopt.a' SHARE_CFLAGS='-I$(top_srcdir)/include' @@ -118,8 +118,8 @@ if test "x$build_ogg123" = xyes; then AC_MSG_RESULT([checking for ogg123 requirements]) - XIPH_PATH_AO(,build_ogg123=no; AC_MSG_WARN(libao missing)) - AM_PATH_CURL(,build_ogg123=no; AC_MSG_WARN(libcurl missing)) + #XIPH_PATH_AO(,build_ogg123=no; AC_MSG_WARN(libao missing)) + #AM_PATH_CURL(,build_ogg123=no; AC_MSG_WARN(libcurl missing)) ACX_PTHREAD(,build_ogg123=no; AC_MSG_WARN(POSIX threads missing)) fi diff -urN vorbis-tools-1.0.1/ltmain.sh vorbis-tools-1.0.1-tremor/ltmain.sh --- vorbis-tools-1.0.1/ltmain.sh 2003-08-02 23:35:16.000000000 +0200 +++ vorbis-tools-1.0.1-tremor/ltmain.sh 2005-05-17 16:58:25.000000000 +0200 @@ -1318,8 +1318,8 @@ else shlib_search_path= fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + #eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + #eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then diff -urN vorbis-tools-1.0.1/ogg123/Makefile.in vorbis-tools-1.0.1-tremor/ogg123/Makefile.in --- vorbis-tools-1.0.1/ogg123/Makefile.in 2003-11-17 17:50:56.000000000 +0100 +++ vorbis-tools-1.0.1-tremor/ogg123/Makefile.in 2005-05-17 17:24:43.000000000 +0200 @@ -107,7 +107,7 @@ OGG123_SPEEX_OBJS = @OGG123_SPEEX_OBJS@ OGGENC_FLAC_OBJS = @OGGENC_FLAC_OBJS@ OGG_CFLAGS = @OGG_CFLAGS@ -OGG_LIBS = @OGG_LIBS@ +OGG_LIBS = -logg OPT_SUBDIRS = @OPT_SUBDIRS@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ @@ -125,10 +125,10 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ -VORBISENC_LIBS = @VORBISENC_LIBS@ -VORBISFILE_LIBS = @VORBISFILE_LIBS@ -VORBIS_CFLAGS = @VORBIS_CFLAGS@ -VORBIS_LIBS = @VORBIS_LIBS@ +VORBISENC_LIBS = +VORBISFILE_LIBS = +VORBIS_CFLAGS = +VORBIS_LIBS = -lvorbisidec am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ @@ -141,16 +141,15 @@ bin_PROGRAMS = ogg123 -INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@ @CURL_CFLAGS@ \ +INCLUDES = @CURL_CFLAGS@ \ @PTHREAD_CFLAGS@ @SHARE_CFLAGS@ @I18N_CFLAGS@ ogg123_LDADD = @OGG123_FLAC_OBJS@ @OGG123_SPEEX_OBJS@ @SHARE_LIBS@ \ - @VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@ \ + -lvorbisidec -logg -lao -ldl \ @SOCKET_LIBS@ @LIBICONV@ @CURL_LIBS@ @PTHREAD_CFLAGS@ \ @PTHREAD_LIBS@ @I18N_LIBS@ @FLAC_LIBS@ @SPEEX_LIBS@ - ogg123_DEPENDENCIES = @OGG123_FLAC_OBJS@ @OGG123_SPEEX_OBJS@ @SHARE_LIBS@ ogg123_SOURCES = audio.c buffer.c callbacks.c \ cfgfile_options.c cmdline_options.c \ diff -urN vorbis-tools-1.0.1/ogg123/ogg123.c vorbis-tools-1.0.1-tremor/ogg123/ogg123.c --- vorbis-tools-1.0.1/ogg123/ogg123.c 2003-09-02 21:37:05.000000000 +0200 +++ vorbis-tools-1.0.1-tremor/ogg123/ogg123.c 2005-05-16 22:29:33.000000000 +0200 @@ -469,6 +469,17 @@ return; } + + if ((new_audio_fmt.big_endian != (BYTE_ORDER == BIG_ENDIAN)) || + new_audio_fmt.signed_sample != 1 || + new_audio_fmt.word_size != 2) + { + /* Tremor can only do big_endian, signed, 16 bit samples */ + status_error(_("Error, Tremor can only decode signed 16 bit PCM " + "host endian.\n")); + return; + } + /* Decide which statistics are valid */ select_stats(stat_format, &options, source, decoder, audio_buffer); diff -urN vorbis-tools-1.0.1/ogg123/oggvorbis_format.c vorbis-tools-1.0.1-tremor/ogg123/oggvorbis_format.c --- vorbis-tools-1.0.1/ogg123/oggvorbis_format.c 2003-06-24 14:34:40.000000000 +0200 +++ vorbis-tools-1.0.1-tremor/ogg123/oggvorbis_format.c 2005-05-16 22:28:37.000000000 +0200 @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include "transport.h" #include "format.h" #include "vorbis_comments.h" @@ -136,8 +136,7 @@ while (nbytes > 0) { old_section = priv->current_section; - ret = ov_read(&priv->vf, ptr, nbytes, audio_fmt->big_endian, - audio_fmt->word_size, audio_fmt->signed_sample, + ret = ov_read(&priv->vf, ptr, nbytes, &priv->current_section); if (ret == 0) { @@ -179,15 +178,16 @@ } -int ovf_seek (decoder_t *decoder, double offset, int whence) +int ovf_seek (decoder_t *decoder, double aoffset, int whence) { ovf_private_t *priv = decoder->private; int ret; - double cur; + ogg_int64_t cur; + ogg_int64_t offset = (aoffset * 1000); if (whence == DECODER_SEEK_CUR) { cur = ov_time_tell(&priv->vf); - if (cur >= 0.0) + if (cur >= 0) offset += cur; else return 0; diff -urN vorbis-tools-1.0.1/ogg123/vorbis_comments.c vorbis-tools-1.0.1-tremor/ogg123/vorbis_comments.c --- vorbis-tools-1.0.1/ogg123/vorbis_comments.c 2003-06-24 14:37:52.000000000 +0200 +++ vorbis-tools-1.0.1-tremor/ogg123/vorbis_comments.c 2005-05-17 16:22:53.000000000 +0200 @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include "format.h" #include "utf8.h" #include "i18n.h"