rpms/timidity++/devel TiMidity++-2.13.2-flac-detect.patch, NONE, 1.1 TiMidity++-2.13.2-flac.patch, NONE, 1.1 TiMidity++-2.13.2-libao-first.patch, NONE, 1.1 TiMidity++-2.13.2-man-pages.patch, NONE, 1.1 TiMidity++-2.13.2-misc-fixes.patch, NONE, 1.1 TiMidity++-2.13.2-mlutil.patch, NONE, 1.1 TiMidity++-2.13.2-speex.patch, NONE, 1.1 timidity++.spec, 1.17, 1.18
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Mon Dec 10 20:35:55 UTC 2007
Author: jwrdegoede
Update of /cvs/extras/rpms/timidity++/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29860
Modified Files:
timidity++.spec
Added Files:
TiMidity++-2.13.2-flac-detect.patch
TiMidity++-2.13.2-flac.patch
TiMidity++-2.13.2-libao-first.patch
TiMidity++-2.13.2-man-pages.patch
TiMidity++-2.13.2-misc-fixes.patch
TiMidity++-2.13.2-mlutil.patch TiMidity++-2.13.2-speex.patch
Log Message:
* Mon Dec 10 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-5
- Add patches to fix detect and compile of speex and flac outputs
- Add various bugfixes from Debian
- Enable ogg, flac, speex, libao and jack output formats (bz 412431)
- Make libao the default output as libao support pulseaudio directly
TiMidity++-2.13.2-flac-detect.patch:
--- NEW FILE TiMidity++-2.13.2-flac-detect.patch ---
diff -up TiMidity++-2.13.2/configure.in~ TiMidity++-2.13.2/configure.in
--- TiMidity++-2.13.2/configure.in~ 2007-12-10 00:26:48.000000000 +0100
+++ TiMidity++-2.13.2/configure.in 2007-12-10 00:26:48.000000000 +0100
@@ -1212,15 +1212,10 @@ else
AC_MSG_RESULT([yes, configuring flac])
SYSEXTRAS="$SYSEXTRAS flac_a.c"
AM_PATH_LIBFLAC([
- EXTRADEFS="$EXTRADEFS -DAU_FLAC"
+ EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_OGGFLAC"
EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS)
LIBS="$LIBS $LIBFLAC_LIBS"
])
- AM_PATH_LIBOGGFLAC([
- EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC"
- EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBOGGFLAC_CFLAGS)
- LIBS="$LIBS $LIBOGGFLAC_LIBS"
- ])
else
AC_MSG_RESULT(no)
fi
diff -up TiMidity++-2.13.2/configure~ TiMidity++-2.13.2/configure
--- TiMidity++-2.13.2/configure~ 2007-12-10 00:26:47.000000000 +0100
+++ TiMidity++-2.13.2/configure 2007-12-10 00:26:47.000000000 +0100
@@ -14471,7 +14471,7 @@ fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- EXTRADEFS="$EXTRADEFS -DAU_FLAC"
+ EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_OGGFLAC"
for f in $LIBFLAC_CFLAGS; do
case ".$f" in
.-I?*|.-D?*) CPPFLAGS="$CPPFLAGS $f" ;;
@@ -14562,211 +14562,6 @@ rm -f conftest.err conftest.$ac_objext \
rm -f conf.libFLACtest
-# Check whether --with-libOggFLAC or --without-libOggFLAC was given.
-if test "${with_libOggFLAC+set}" = set; then
- withval="$with_libOggFLAC"
- libOggFLAC_prefix="$withval"
-else
- libOggFLAC_prefix=""
-fi;
-
-# Check whether --with-libOggFLAC-libraries or --without-libOggFLAC-libraries was given.
-if test "${with_libOggFLAC_libraries+set}" = set; then
- withval="$with_libOggFLAC_libraries"
- libOggFLAC_libraries="$withval"
-else
- libOggFLAC_libraries=""
-fi;
-
-# Check whether --with-libOggFLAC-includes or --without-libOggFLAC-includes was given.
-if test "${with_libOggFLAC_includes+set}" = set; then
- withval="$with_libOggFLAC_includes"
- libOggFLAC_includes="$withval"
-else
- libOggFLAC_includes=""
-fi;
-# Check whether --enable-libOggFLACtest or --disable-libOggFLACtest was given.
-if test "${enable_libOggFLACtest+set}" = set; then
- enableval="$enable_libOggFLACtest"
-
-else
- enable_libOggFLACtest=yes
-fi;
-
- if test "x$libOggFLAC_libraries" != "x" ; then
- LIBOGGFLAC_LIBS="-L$libOggFLAC_libraries"
- elif test "x$libOggFLAC_prefix" != "x" ; then
- LIBOGGFLAC_LIBS="-L$libOggFLAC_prefix/lib"
- elif test "x$prefix" != "xNONE" ; then
- LIBOGGFLAC_LIBS="-L$prefix/lib"
- fi
-
- LIBOGGFLAC_LIBS="$LIBOGGFLAC_LIBS -lOggFLAC -lFLAC -lm"
-
- if test "x$libOggFLAC_includes" != "x" ; then
- LIBOGGFLAC_CFLAGS="-I$libOggFLAC_includes"
- elif test "x$libOggFLAC_prefix" != "x" ; then
- LIBOGGFLAC_CFLAGS="-I$libOggFLAC_prefix/include"
- elif test "$prefix" != "xNONE"; then
- LIBOGGFLAC_CFLAGS="-I$prefix/include"
- fi
-
- echo "$as_me:$LINENO: checking for libOggFLAC" >&5
-echo $ECHO_N "checking for libOggFLAC... $ECHO_C" >&6
- no_libOggFLAC=""
-
-
- if test "x$enable_libOggFLACtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_CXXFLAGS="$CXXFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
- CXXFLAGS="$CXXFLAGS $LIBOGGFLAC_CFLAGS"
- LIBS="$LIBS $LIBOGGFLAC_LIBS"
- rm -f conf.libOggFLACtest
- if test "$cross_compiling" = yes; then
- echo $ac_n "cross compiling; assumed OK... $ac_c"
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <OggFLAC/stream_decoder.h>
-
-int main ()
-{
- system("touch conf.libOggFLACtest");
- return 0;
-}
-
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-no_libOggFLAC=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
-
- if test "x$no_libOggFLAC" = "x" ; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
- EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC"
- for f in $LIBOGGFLAC_CFLAGS; do
- case ".$f" in
- .-I?*|.-D?*) CPPFLAGS="$CPPFLAGS $f" ;;
- *) CFLAGS="$CPPFLAGS $f" ;;
- esac
-done
-
- LIBS="$LIBS $LIBOGGFLAC_LIBS"
-
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- if test -f conf.libOggFLACtest ; then
- :
- else
- echo "*** Could not run libOggFLAC test program, checking why..."
- CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
- LIBS="$LIBS $LIBOGGFLAC_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <OggFLAC/stream_decoder.h>
-
-int
-main ()
-{
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding libOggFLAC or finding the wrong"
- echo "*** version of libOggFLAC. If it is not finding libOggFLAC, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means libOggFLAC was incorrectly installed"
- echo "*** or that you have moved libOggFLAC since it was installed. In the latter case, you"
- echo "*** may want to edit the libOggFLAC-config script: $LIBOGGFLAC_CONFIG"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- LIBOGGFLAC_CFLAGS=""
- LIBOGGFLAC_LIBS=""
- :
- fi
-
-
- rm -f conf.libOggFLACtest
-
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
TiMidity++-2.13.2-flac.patch:
--- NEW FILE TiMidity++-2.13.2-flac.patch ---
--- timidity-2.13.2.orig/timidity/flac_a.c
+++ timidity-2.13.2/timidity/flac_a.c
@@ -45,9 +45,6 @@
#endif
#include <FLAC/all.h>
-#ifdef AU_OGGFLAC
-#include <OggFLAC/stream_encoder.h>
-#endif
#ifdef AU_FLAC_DLL
#include "w32_libFLAC_dll_g.h"
@@ -78,11 +75,7 @@
DEFAULT_RATE, PE_SIGNED|PE_16BIT, PF_PCM_STREAM,
-1,
{0}, /* default: get all the buffer fragments you can */
-#ifndef AU_OGGFLAC
- "FLAC", 'F',
-#else
"FLAC / OggFLAC", 'F',
-#endif /* AU_OGGFLAC */
NULL,
open_output,
close_output,
@@ -100,28 +93,22 @@
unsigned long out_bytes;
union {
FLAC__StreamEncoderState flac;
- FLAC__SeekableStreamEncoderState s_flac;
-#ifdef AU_OGGFLAC
- OggFLAC__StreamEncoderState ogg;
-#endif
+ FLAC__StreamEncoderState s_flac;
+ FLAC__StreamEncoderState ogg;
} state;
union {
union {
FLAC__StreamEncoder *stream;
- FLAC__SeekableStreamEncoder *s_stream;
+ FLAC__StreamEncoder *s_stream;
} flac;
-#ifdef AU_OGGFLAC
union {
- OggFLAC__StreamEncoder *stream;
+ FLAC__StreamEncoder *stream;
} ogg;
-#endif
} encoder;
} FLAC_ctx;
typedef struct {
-#ifdef AU_OGGFLAC
int isogg;
-#endif
int verify;
int padding;
int blocksize;
@@ -138,9 +125,7 @@
/* default compress level is 5 */
FLAC_options flac_options = {
-#ifdef AU_OGGFLAC
0, /* isogg */
-#endif
0, /* verify */
4096, /* padding */
4608, /* blocksize */
@@ -158,13 +143,11 @@
static long serial_number = 0;
FLAC_ctx *flac_ctx = NULL;
-#ifdef AU_OGGFLAC
static FLAC__StreamEncoderWriteStatus
-ogg_stream_encoder_write_callback(const OggFLAC__StreamEncoder *encoder,
+ogg_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
const FLAC__byte buffer[],
unsigned bytes, unsigned samples,
unsigned current_frame, void *client_data);
-#endif
static FLAC__StreamEncoderWriteStatus
flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
const FLAC__byte buffer[],
@@ -174,13 +157,10 @@
const FLAC__StreamMetadata *metadata,
void *client_data);
static FLAC__StreamEncoderWriteStatus
-flac_seekable_stream_encoder_write_callback(const FLAC__SeekableStreamEncoder *encoder,
+flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
const FLAC__byte buffer[],
unsigned bytes, unsigned samples,
unsigned current_frame, void *client_data);
-static void flac_seekable_stream_encoder_metadata_callback(const FLAC__SeekableStreamEncoder *encoder,
- const FLAC__StreamMetadata *metadata,
- void *client_data);
/* preset */
void flac_set_compression_level(int compression_level)
@@ -278,12 +258,10 @@
{
flac_options.verify = verify;
}
-#ifdef AU_OGGFLAC
void flac_set_option_oggflac(int isogg)
{
flac_options.isogg = isogg;
}
-#endif
static int flac_session_close()
{
@@ -295,19 +273,17 @@
dpm.fd = -1;
if (ctx != NULL) {
-#ifdef AU_OGGFLAC
if (flac_options.isogg) {
if (ctx->encoder.ogg.stream) {
- OggFLAC__stream_encoder_finish(ctx->encoder.ogg.stream);
- OggFLAC__stream_encoder_delete(ctx->encoder.ogg.stream);
+ FLAC__stream_encoder_finish(ctx->encoder.ogg.stream);
+ FLAC__stream_encoder_delete(ctx->encoder.ogg.stream);
}
}
else
-#endif /* AU_OGGFLAC */
if (flac_options.seekable) {
if (ctx->encoder.flac.s_stream) {
- FLAC__seekable_stream_encoder_finish(ctx->encoder.flac.s_stream);
- FLAC__seekable_stream_encoder_delete(ctx->encoder.flac.s_stream);
+ FLAC__stream_encoder_finish(ctx->encoder.flac.s_stream);
+ FLAC__stream_encoder_delete(ctx->encoder.flac.s_stream);
}
}
else
@@ -371,17 +347,16 @@
metadata[num_metadata++] = &padding;
}
-#ifdef AU_OGGFLAC
if (flac_options.isogg) {
- if ((ctx->encoder.ogg.stream = OggFLAC__stream_encoder_new()) == NULL) {
+ if ((ctx->encoder.ogg.stream = FLAC__stream_encoder_new()) == NULL) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create OggFLAC stream");
flac_session_close();
return -1;
}
- OggFLAC__stream_encoder_set_channels(ctx->encoder.ogg.stream, nch);
+ FLAC__stream_encoder_set_channels(ctx->encoder.ogg.stream, nch);
/* 16bps only */
- OggFLAC__stream_encoder_set_bits_per_sample(ctx->encoder.ogg.stream, 16);
+ FLAC__stream_encoder_set_bits_per_sample(ctx->encoder.ogg.stream, 16);
/* set sequential number for serial */
serial_number++;
@@ -389,9 +364,9 @@
srand(time(NULL));
serial_number = rand();
}
- OggFLAC__stream_encoder_set_serial_number(ctx->encoder.ogg.stream, serial_number);
+ FLAC__stream_encoder_set_ogg_serial_number(ctx->encoder.ogg.stream, serial_number);
- OggFLAC__stream_encoder_set_verify(ctx->encoder.ogg.stream, flac_options.verify);
+ FLAC__stream_encoder_set_verify(ctx->encoder.ogg.stream, flac_options.verify);
if (!FLAC__format_sample_rate_is_valid(dpm.rate)) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "invalid sampling rate %d",
@@ -399,53 +374,52 @@
flac_session_close();
return -1;
}
- OggFLAC__stream_encoder_set_sample_rate(ctx->encoder.ogg.stream, dpm.rate);
+ FLAC__stream_encoder_set_sample_rate(ctx->encoder.ogg.stream, dpm.rate);
- OggFLAC__stream_encoder_set_qlp_coeff_precision(ctx->encoder.ogg.stream, flac_options.qlp_coeff_precision);
+ FLAC__stream_encoder_set_qlp_coeff_precision(ctx->encoder.ogg.stream, flac_options.qlp_coeff_precision);
/* expensive! */
- OggFLAC__stream_encoder_set_do_qlp_coeff_prec_search(ctx->encoder.ogg.stream, flac_options.qlp_coeff_precision_search);
+ FLAC__stream_encoder_set_do_qlp_coeff_prec_search(ctx->encoder.ogg.stream, flac_options.qlp_coeff_precision_search);
if (nch == 2) {
- OggFLAC__stream_encoder_set_do_mid_side_stereo(ctx->encoder.ogg.stream, flac_options.mid_side);
- OggFLAC__stream_encoder_set_loose_mid_side_stereo(ctx->encoder.ogg.stream, flac_options.adaptive_mid_side);
+ FLAC__stream_encoder_set_do_mid_side_stereo(ctx->encoder.ogg.stream, flac_options.mid_side);
+ FLAC__stream_encoder_set_loose_mid_side_stereo(ctx->encoder.ogg.stream, flac_options.adaptive_mid_side);
}
- OggFLAC__stream_encoder_set_max_lpc_order(ctx->encoder.ogg.stream, flac_options.max_lpc_order);
- OggFLAC__stream_encoder_set_min_residual_partition_order(ctx->encoder.ogg.stream, flac_options.min_residual_partition_order);
- OggFLAC__stream_encoder_set_max_residual_partition_order(ctx->encoder.ogg.stream, flac_options.max_residual_partition_order);
-
- OggFLAC__stream_encoder_set_blocksize(ctx->encoder.ogg.stream, flac_options.blocksize);
+ FLAC__stream_encoder_set_max_lpc_order(ctx->encoder.ogg.stream, flac_options.max_lpc_order);
+ FLAC__stream_encoder_set_min_residual_partition_order(ctx->encoder.ogg.stream, flac_options.min_residual_partition_order);
+ FLAC__stream_encoder_set_max_residual_partition_order(ctx->encoder.ogg.stream, flac_options.max_residual_partition_order);
- OggFLAC__stream_encoder_set_client_data(ctx->encoder.ogg.stream, ctx);
+ FLAC__stream_encoder_set_blocksize(ctx->encoder.ogg.stream, flac_options.blocksize);
if (0 < num_metadata)
- OggFLAC__stream_encoder_set_metadata(ctx->encoder.ogg.stream, metadata, num_metadata);
-
- /* set callback */
- OggFLAC__stream_encoder_set_write_callback(ctx->encoder.ogg.stream, ogg_stream_encoder_write_callback);
+ FLAC__stream_encoder_set_metadata(ctx->encoder.ogg.stream, metadata, num_metadata);
- ctx->state.ogg = OggFLAC__stream_encoder_init(ctx->encoder.ogg.stream);
- if (ctx->state.ogg != OggFLAC__STREAM_ENCODER_OK) {
+ ctx->state.ogg = FLAC__stream_encoder_init_ogg_stream(ctx->encoder.ogg.stream,
+ 0,
+ ogg_stream_encoder_write_callback,
+ 0, 0, 0,
+ ctx);
+ if (ctx->state.ogg != FLAC__STREAM_ENCODER_OK) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create OggFLAC state (%s)",
- OggFLAC__StreamEncoderStateString[ctx->state.ogg]);
+ FLAC__StreamEncoderStateString[ctx->state.ogg]);
flac_session_close();
return -1;
}
}
else
-#endif /* AU_OGGFLAC */
if (flac_options.seekable) {
- if ((ctx->encoder.flac.s_stream = FLAC__seekable_stream_encoder_new()) == NULL) {
+ /* FLAC SEEKABLE STREAM */
+ if ((ctx->encoder.flac.s_stream = FLAC__stream_encoder_new()) == NULL) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create FLAC stream");
flac_session_close();
return -1;
}
- FLAC__seekable_stream_encoder_set_channels(ctx->encoder.flac.s_stream, nch);
+ FLAC__stream_encoder_set_channels(ctx->encoder.flac.s_stream, nch);
/* 16bps only */
- FLAC__seekable_stream_encoder_set_bits_per_sample(ctx->encoder.flac.s_stream, 16);
+ FLAC__stream_encoder_set_bits_per_sample(ctx->encoder.flac.s_stream, 16);
- FLAC__seekable_stream_encoder_set_verify(ctx->encoder.flac.s_stream, flac_options.verify);
+ FLAC__stream_encoder_set_verify(ctx->encoder.flac.s_stream, flac_options.verify);
if (!FLAC__format_sample_rate_is_valid(dpm.rate)) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "invalid sampling rate %d",
@@ -453,44 +427,40 @@
flac_session_close();
return -1;
}
- FLAC__seekable_stream_encoder_set_sample_rate(ctx->encoder.flac.s_stream, dpm.rate);
+ FLAC__stream_encoder_set_sample_rate(ctx->encoder.flac.s_stream, dpm.rate);
- FLAC__seekable_stream_encoder_set_qlp_coeff_precision(ctx->encoder.flac.s_stream, flac_options.qlp_coeff_precision);
+ FLAC__stream_encoder_set_qlp_coeff_precision(ctx->encoder.flac.s_stream, flac_options.qlp_coeff_precision);
/* expensive! */
- FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(ctx->encoder.flac.s_stream, flac_options.qlp_coeff_precision_search);
+ FLAC__stream_encoder_set_do_qlp_coeff_prec_search(ctx->encoder.flac.s_stream, flac_options.qlp_coeff_precision_search);
if (nch == 2) {
- FLAC__seekable_stream_encoder_set_do_mid_side_stereo(ctx->encoder.flac.s_stream, flac_options.mid_side);
- FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(ctx->encoder.flac.s_stream, flac_options.adaptive_mid_side);
+ FLAC__stream_encoder_set_do_mid_side_stereo(ctx->encoder.flac.s_stream, flac_options.mid_side);
+ FLAC__stream_encoder_set_loose_mid_side_stereo(ctx->encoder.flac.s_stream, flac_options.adaptive_mid_side);
}
- FLAC__seekable_stream_encoder_set_max_lpc_order(ctx->encoder.flac.s_stream, flac_options.max_lpc_order);
- FLAC__seekable_stream_encoder_set_min_residual_partition_order(ctx->encoder.flac.s_stream, flac_options.min_residual_partition_order);
- FLAC__seekable_stream_encoder_set_max_residual_partition_order(ctx->encoder.flac.s_stream, flac_options.max_residual_partition_order);
+ FLAC__stream_encoder_set_max_lpc_order(ctx->encoder.flac.s_stream, flac_options.max_lpc_order);
+ FLAC__stream_encoder_set_min_residual_partition_order(ctx->encoder.flac.s_stream, flac_options.min_residual_partition_order);
+ FLAC__stream_encoder_set_max_residual_partition_order(ctx->encoder.flac.s_stream, flac_options.max_residual_partition_order);
- FLAC__seekable_stream_encoder_set_blocksize(ctx->encoder.flac.s_stream, flac_options.blocksize);
- FLAC__seekable_stream_encoder_set_client_data(ctx->encoder.flac.s_stream, ctx);
+ FLAC__stream_encoder_set_blocksize(ctx->encoder.flac.s_stream, flac_options.blocksize);
if (0 < num_metadata)
- FLAC__seekable_stream_encoder_set_metadata(ctx->encoder.flac.s_stream, metadata, num_metadata);
+ FLAC__stream_encoder_set_metadata(ctx->encoder.flac.s_stream, metadata, num_metadata);
- /* set callback */
-/* FLAC__seekable_stream_encoder_set_metadata_callback(ctx->encoder.flac.s_stream, flac_seekable_stream_encoder_metadata_callback); /* */
-#ifndef __BORLANDC__
- FLAC__stream_encoder_set_metadata_callback(ctx->encoder.flac.s_stream, flac_seekable_stream_encoder_metadata_callback); /* */
-#endif
- FLAC__seekable_stream_encoder_set_write_callback(ctx->encoder.flac.s_stream, flac_seekable_stream_encoder_write_callback);
+ ctx->state.s_flac = FLAC__stream_encoder_init_stream(
+ ctx->encoder.flac.s_stream,
+ flac_stream_encoder_write_callback,
+ 0, 0, 0,
+ ctx);
- ctx->state.s_flac = FLAC__seekable_stream_encoder_init(ctx->encoder.flac.s_stream);
- if (ctx->state.s_flac != FLAC__SEEKABLE_STREAM_ENCODER_OK) {
+ if (ctx->state.s_flac != FLAC__STREAM_ENCODER_OK) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create FLAC state (%s)",
- FLAC__SeekableStreamEncoderStateString[ctx->state.s_flac]);
+ FLAC__StreamEncoderStateString[ctx->state.s_flac]);
flac_session_close();
return -1;
}
- }
- else
- {
+ } else {
+ /* NON SEEKABLE STREAM */
if ((ctx->encoder.flac.stream = FLAC__stream_encoder_new()) == NULL) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create FLAC stream");
flac_session_close();
@@ -525,16 +495,16 @@
FLAC__stream_encoder_set_max_residual_partition_order(ctx->encoder.flac.stream, flac_options.max_residual_partition_order);
FLAC__stream_encoder_set_blocksize(ctx->encoder.flac.stream, flac_options.blocksize);
- FLAC__stream_encoder_set_client_data(ctx->encoder.flac.stream, ctx);
if (0 < num_metadata)
FLAC__stream_encoder_set_metadata(ctx->encoder.flac.stream, metadata, num_metadata);
- /* set callback */
- FLAC__stream_encoder_set_metadata_callback(ctx->encoder.flac.stream, flac_stream_encoder_metadata_callback);
- FLAC__stream_encoder_set_write_callback(ctx->encoder.flac.stream, flac_stream_encoder_write_callback);
-
- ctx->state.flac = FLAC__stream_encoder_init(ctx->encoder.flac.stream);
+ ctx->state.flac = FLAC__stream_encoder_init_stream(ctx->encoder.flac.stream,
+ flac_stream_encoder_write_callback,
+ 0,
+ 0,
+ flac_stream_encoder_metadata_callback,
+ ctx);
if (ctx->state.flac != FLAC__STREAM_ENCODER_OK) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create FLAC state (%s)",
FLAC__StreamEncoderStateString[ctx->state.flac]);
@@ -550,7 +520,6 @@
{
char *output_filename;
-#ifdef AU_OGGFLAC
if (flac_options.isogg) {
#ifndef __W32G__
output_filename = create_auto_output_name(input_filename, "ogg", NULL, 0);
@@ -559,7 +528,6 @@
#endif
}
else
-#endif /* AU_OGGFLAC */
{
#ifndef __W32G__
output_filename = create_auto_output_name(input_filename, "flac", NULL, 0);
@@ -608,12 +576,10 @@
exclude_enc |= PE_BYTESWAP | PE_24BIT;
dpm.encoding = validate_encoding(dpm.encoding, include_enc, exclude_enc);
-#ifdef AU_OGGFLAC
if (flac_options.isogg) {
ctl->cmsg(CMSG_WARNING, VERB_NORMAL, "*** cannot write back seekpoints when encoding to Ogg yet ***");
ctl->cmsg(CMSG_WARNING, VERB_NORMAL, "*** and stream end will not be written. ***");
}
-#endif
#ifndef __W32G__
if(dpm.name == NULL) {
@@ -638,9 +604,8 @@
return 0;
}
-#ifdef AU_OGGFLAC
static FLAC__StreamEncoderWriteStatus
-ogg_stream_encoder_write_callback(const OggFLAC__StreamEncoder *encoder,
+ogg_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
const FLAC__byte buffer[],
unsigned bytes, unsigned samples,
unsigned current_frame, void *client_data)
@@ -654,7 +619,6 @@
else
return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
}
-#endif
static FLAC__StreamEncoderWriteStatus
flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
const FLAC__byte buffer[],
@@ -675,26 +639,6 @@
void *client_data)
{
}
-static FLAC__StreamEncoderWriteStatus
-flac_seekable_stream_encoder_write_callback(const FLAC__SeekableStreamEncoder *encoder,
- const FLAC__byte buffer[],
- unsigned bytes, unsigned samples,
- unsigned current_frame, void *client_data)
-{
- FLAC_ctx *ctx = (FLAC_ctx *)client_data;
-
- ctx->out_bytes += bytes;
-
- if (write(dpm.fd, buffer, bytes) == bytes)
- return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
- else
- return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
-}
-static void flac_seekable_stream_encoder_metadata_callback(const FLAC__SeekableStreamEncoder *encoder,
- const FLAC__StreamMetadata *metadata,
- void *client_data)
-{
-}
static int output_data(char *buf, int32 nbytes)
{
@@ -723,21 +667,18 @@
oggbuf[i] = *s++;
}
-#ifdef AU_OGGFLAC
if (flac_options.isogg) {
- ctx->state.ogg = OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream);
- if (ctx->state.ogg != OggFLAC__STREAM_ENCODER_OK) {
- if (ctx->state.ogg == OggFLAC__STREAM_ENCODER_FLAC_STREAM_ENCODER_ERROR) {
+ ctx->state.ogg = FLAC__stream_encoder_get_state(ctx->encoder.ogg.stream);
+ if (ctx->state.ogg != FLAC__STREAM_ENCODER_OK) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "FLAC stream verify error (%s)",
- FLAC__StreamDecoderStateString[OggFLAC__stream_encoder_get_verify_decoder_state(ctx->encoder.ogg.stream)]);
- }
+ FLAC__StreamEncoderStateString[FLAC__stream_encoder_get_verify_decoder_state(ctx->encoder.ogg.stream)]);
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot encode OggFLAC stream (%s)",
- OggFLAC__StreamEncoderStateString[ctx->state.ogg]);
+ FLAC__StreamEncoderStateString[ctx->state.ogg]);
flac_session_close();
return -1;
}
- if (!OggFLAC__stream_encoder_process_interleaved(ctx->encoder.ogg.stream, oggbuf,
+ if (!FLAC__stream_encoder_process_interleaved(ctx->encoder.ogg.stream, oggbuf,
nbytes / nch / 2)) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot encode OggFLAC stream");
flac_session_close();
@@ -745,24 +686,23 @@
}
}
else
-#endif /* AU_OGGFLAC */
if (flac_options.seekable) {
- ctx->state.s_flac = FLAC__seekable_stream_encoder_get_state(ctx->encoder.flac.s_stream);
+ ctx->state.s_flac = FLAC__stream_encoder_get_state(ctx->encoder.flac.s_stream);
if (ctx->state.s_flac != FLAC__STREAM_ENCODER_OK) {
if (ctx->state.s_flac == FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR |
FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "FLAC stream verify error (%s)",
- FLAC__SeekableStreamDecoderStateString[FLAC__seekable_stream_encoder_get_verify_decoder_state(ctx->encoder.flac.s_stream)]);
+ FLAC__StreamDecoderStateString[FLAC__stream_encoder_get_verify_decoder_state(ctx->encoder.flac.s_stream)]);
}
else {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot encode FLAC stream (%s)",
- FLAC__SeekableStreamEncoderStateString[ctx->state.s_flac]);
+ FLAC__StreamEncoderStateString[ctx->state.s_flac]);
}
flac_session_close();
return -1;
}
- if (!FLAC__seekable_stream_encoder_process_interleaved(ctx->encoder.flac.s_stream, oggbuf,
+ if (!FLAC__stream_encoder_process_interleaved(ctx->encoder.flac.s_stream, oggbuf,
nbytes / nch / 2 )) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot encode FLAC stream");
flac_session_close();
@@ -814,19 +754,17 @@
}
if (flac_options.isogg) {
-#ifdef AU_OGGFLAC
- if ((ctx->state.ogg = OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) != OggFLAC__STREAM_ENCODER_OK) {
+ if ((ctx->state.ogg = FLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) != FLAC__STREAM_ENCODER_OK) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid (%s)",
- OggFLAC__StreamEncoderStateString[ctx->state.ogg]);
+ FLAC__StreamEncoderStateString[ctx->state.ogg]);
/* fall through */
}
}
else
-#endif /* AU_OGGFLAC */
if (flac_options.seekable) {
- if ((ctx->state.s_flac = FLAC__seekable_stream_encoder_get_state(ctx->encoder.flac.s_stream)) != FLAC__SEEKABLE_STREAM_ENCODER_OK) {
+ if ((ctx->state.s_flac = FLAC__stream_encoder_get_state(ctx->encoder.flac.s_stream)) != FLAC__STREAM_ENCODER_OK) {
ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "FLAC stream encoder is invalid (%s)",
- FLAC__SeekableStreamEncoderStateString[ctx->state.s_flac]);
+ FLAC__StreamEncoderStateString[ctx->state.s_flac]);
/* fall through */
}
}
TiMidity++-2.13.2-libao-first.patch:
--- NEW FILE TiMidity++-2.13.2-libao-first.patch ---
diff -up TiMidity++-2.13.2/timidity/output.c~ TiMidity++-2.13.2/timidity/output.c
--- TiMidity++-2.13.2/timidity/output.c~ 2007-12-10 16:55:05.000000000 +0100
+++ TiMidity++-2.13.2/timidity/output.c 2007-12-10 16:55:05.000000000 +0100
@@ -133,6 +133,10 @@ extern PlayMode gogo_play_mode;
extern PlayMode modmidi_play_mode;
PlayMode *play_mode_list[] = {
+#if defined(AU_AO) /* Try libao first as that will give us pulseaudio */
+ &ao_play_mode,
+#endif /* AU_AO */
+
#if defined(AU_ARTS)
&arts_play_mode,
#endif /* AU_ARTS */
@@ -171,10 +175,6 @@ PlayMode *play_mode_list[] = {
&nas_play_mode,
#endif /* AU_NAS */
-#if defined(AU_AO)
- &ao_play_mode,
-#endif /* AU_PORTAUDIO */
-
#ifndef __MACOS__
&wave_play_mode,
&raw_play_mode,
diff -ur TiMidity++-2.13.2/timidity/ao_a.c TiMidity++-2.13.2.new/timidity/ao_a.c
--- TiMidity++-2.13.2/timidity/ao_a.c 2004-04-12 19:44:03.000000000 +0200
+++ TiMidity++-2.13.2.new/timidity/ao_a.c 2007-12-10 20:28:14.000000000 +0100
@@ -42,6 +42,7 @@
static void close_output(void);
static int output_data(char *buf, int32 nbytes);
static int acntl(int request, void *arg);
+static int detect(void);
/* export the playback mode */
@@ -56,7 +57,8 @@
open_output,
close_output,
output_data,
- acntl
+ acntl,
+ detect
};
static ao_device *ao_device_ctx;
@@ -167,3 +169,29 @@
}
return -1;
}
+
+static int detect(void)
+{
+ int driver_id, result = 0;
+ ao_sample_format ao_sample_format_ctx;
+ ao_device *ao_device_ctx;
+
+ ao_initialize();
+
+ /* Only succeed in autodetect mode when pulseaudio is available! */
+ driver_id = ao_driver_id("pulse");
+
+ ao_sample_format_ctx.rate = 44100;
+ ao_sample_format_ctx.bits = 16;
+ ao_sample_format_ctx.channels = 2;
+ ao_sample_format_ctx.byte_format = AO_FMT_NATIVE;
+
+ if ((ao_device_ctx = ao_open_live(driver_id, &ao_sample_format_ctx, NULL))) {
+ result = 1;
+ ao_close(ao_device_ctx);
+ }
+
+ ao_shutdown();
+
+ return result;
+}
TiMidity++-2.13.2-man-pages.patch:
--- NEW FILE TiMidity++-2.13.2-man-pages.patch ---
--- timidity-2.13.2.orig/doc/C/timidity.1
+++ timidity-2.13.2/doc/C/timidity.1
@@ -199,7 +199,7 @@
.RE
.TP
.B \-a, \-\-[no\-]anti\-alias
-Turns on antialiasing. Samples are run through a lowpass filter
+Turns on anti-aliasing. Samples are run through a lowpass filter
before playing, which reduces aliasing noise at low resampling
frequencies.
.TP
@@ -269,7 +269,7 @@
Sets the system manufacturer ID to \fIHH\fP (where \fIHH\fP are two
hex\-digits).
.br
-In this option, the manufacuture ID is set unchangable. Manufacuture
+In this option, the manufacture ID is set unchangeable. Manufacture
ID from the input file would be ignored.
.TP
.BI b n ", \-\-default\-bank=" n
@@ -516,10 +516,10 @@
Launch \fBTiMidity++\fP as ALSA sequencer client.
.TP
.B \-iW
-Windodws synthesizer interface
+Windows synthesizer interface
.TP
.B \-iw
-Windodws GUI interface
+Windows GUI interface
.TP
.B \-iP
PortMIDI synthesizer interface
@@ -740,7 +740,7 @@
.B \-Oj
JACK
.TP
-.B \-Or
+.B \-OR
aRts
.TP
.B \-OA
@@ -1064,8 +1064,7 @@
\fBTiMidity++\fP Debug
.RE
.SH SEE ALSO
-lsmidiprog(1), mididump(1), patinfo(1), sf2text(1), wav2pat(1),
-timidity.cfg(5)
+sf2text(1), timidity.cfg(5)
.SH COPYRIGHT
Copyright (C) 1999\-2004 Masanao Izumo <iz at onicos.co.jp>
.br
--- timidity-2.13.2.orig/doc/C/timidity.cfg.5
+++ timidity-2.13.2/doc/C/timidity.cfg.5
@@ -4,7 +4,7 @@
.SH DESCRIPTION
The file \fBtimidity.cfg\fP describes the runtime environments of
timidity(1): that are the path of sound font, instruments
-configurations or else.
+configurations, etc.
.br
\fBTiMidity++\fP looks for the configuration file \fBtimidity.cfg\fP
at startup, before processing any options. If it can't be accessed,
@@ -30,7 +30,7 @@
${variable} # same as $variable
.sp
For the moment, the command which newly defines variables is not
-prepared. The undifined variable is transposed to null string.
+prepared. The undefined variable is transposed to null string.
.br
The variable defined as a regular variable is the next only one.
.TP
@@ -89,13 +89,13 @@
.BI "bank " "[MapID1] number"
Selects the tone bank to modify. Patch mappings that follow will
affect this tone bank. You can indicate specific map as a target, by
-specifing any ofthe following to \fIMapID1\fP: \fBgm2\fP, \fBsc55\fP,
+specifying any of the following to \fIMapID1\fP: \fBgm2\fP, \fBsc55\fP,
\fBsc88\fP, \fBsc88pro\fP, \fBsc8850\fP, \fBxg\fP and \fBxgsfx64\fP.
.TP
.BI "drumset " "[MapID2] number"
Selects the drum set to modify. Patch mappings that follow will
affect this drum set. You can indicate specific map as a target, by
-specifing any ofthe following to \fIMapID2\fP: \fBgm2drum\fP,
+specifying any ofthe following to \fIMapID2\fP: \fBgm2drum\fP,
\fBsc55drum\fP, \fBsc88drum\fP, \fBsc88prodrum\fP, \fBsc8850drum\fP,
\fBxgdrum\fP and \fBxgsfx126\fP.
.TP
@@ -363,7 +363,7 @@
.TP
.BI "#extension timeout " "program second"
Specifies the time\-out value of the \fIprogram\fP. If any notes
-played with the tone number \fIprogram\fP are suspended more than
+played with the tone number \fIprogram\fP are suspended for more than
\fIsecond\fP seconds, \fBTiMidity++\fP kills the notes.
.TP
.BI "#extension copydrumset " drumset
@@ -470,9 +470,7 @@
will read from the output of cat fild.mid.
.SH FILES
.TP
-.B /etc/timidity.cfg
-.TP
-.B /usr/local/share/timidity/timidity.cfg
+.B /etc/timidity/timidity.cfg
.SH SEE ALSO
timidity(1), lsmidiprog(1), mididump(1), patinfo(1), sf2text(1), wav2pat(1)
.SH COPYRIGHT
--- timidity-2.13.2.orig/doc/ja_JP.eucJP/timidity.1
+++ timidity-2.13.2/doc/ja_JP.eucJP/timidity.1
@@ -745,7 +745,7 @@
.B \-Oj
JACK
.TP
-.B \-Or
+.B \-OR
aRts
.TP
.B \-OA
--- timidity-2.13.2.orig/doc/ja_JP.eucJP/timidity.cfg.5
+++ timidity-2.13.2/doc/ja_JP.eucJP/timidity.cfg.5
@@ -466,8 +466,6 @@
.SH ¥Õ¥¡¥¤¥ë
.TP
.B /etc/timidity.cfg
-.TP
-.B /usr/local/share/timidity/timidity.cfg
.SH ´ØÏ¢¹àÌÜ
timidity(1), lsmidiprog(1), mididump(1), patinfo(1), sf2text(1), wav2pat(1)
.SH Ãøºî¸¢
TiMidity++-2.13.2-misc-fixes.patch:
--- NEW FILE TiMidity++-2.13.2-misc-fixes.patch ---
--- timidity-2.13.2.orig/timidity/aq.c
+++ timidity-2.13.2/timidity/aq.c
@@ -87,7 +87,7 @@
/* effect.c */
extern void init_effect(void);
-extern int do_effect(int32* buf, int32 count);
+extern void do_effect(int32* buf, int32 count);
int aq_calc_fragsize(void)
{
--- timidity-2.13.2.orig/timidity/common.c
+++ timidity-2.13.2/timidity/common.c
@@ -405,7 +411,8 @@
}
/* First try the given name */
- strncpy(current_filename, url_unexpand_home_dir(name), 1023);
+ /* strncpy(current_filename, url_unexpand_home_dir(name), 1023); */
+ strncpy(current_filename, name, 1023);
current_filename[1023]='\0';
if(noise_mode)
--- timidity-2.13.2.orig/timidity/mod2midi.c
+++ timidity-2.13.2/timidity/mod2midi.c
@@ -195,7 +195,8 @@
if (period < 14 || period > 13696)
{
- ctl->cmsg(CMSG_WARNING, VERB_NORMAL, "BAD period %d\n", period);
+ ctl->cmsg(CMSG_WARNING, VERB_NOISY, "BAD period %d", period);
+ *finetune = 0;
return -1;
}
@@ -266,11 +267,13 @@
return;
new_noteon = period2note (ModV[v].period, &bend);
+ if (new_noteon >= 0) {
#ifndef TRACE_SLIDE_NOTES
- bend += (new_noteon - ModV[v].noteon) << 13;
- new_noteon = ModV[v].noteon;
+ bend += (new_noteon - ModV[v].noteon) << 13;
+ new_noteon = ModV[v].noteon;
#endif
- bend = WHEEL_VALUE(bend);
+ bend = WHEEL_VALUE(bend);
+ }
if (ModV[v].noteon != new_noteon)
{
@@ -278,7 +281,7 @@
if (new_noteon < 0)
{
- ctl->cmsg(CMSG_WARNING, VERB_VERBOSE,
+ ctl->cmsg(CMSG_WARNING, VERB_NOISY,
"Strange period %d",
ModV[v].period);
return;
@@ -330,13 +333,13 @@
Voice_Stop (v);
new_noteon = period2note (ModV[v].period, &bend);
- bend = WHEEL_VALUE(bend);
if (new_noteon < 0) {
- ctl->cmsg(CMSG_WARNING, VERB_VERBOSE,
+ ctl->cmsg(CMSG_WARNING, VERB_NOISY,
"Strange period %d",
ModV[v].period);
return;
}
+ bend = WHEEL_VALUE(bend);
ModV[v].noteon = new_noteon;
ModV[v].time = at;
@@ -590,9 +593,13 @@
special_patch[i]->sample = sp =
(Sample *)safe_malloc(sizeof(Sample));
memset(sp, 0, sizeof(Sample));
- strncpy(name, s->samplename, 22);
- name[22] = '\0';
- code_convert(name, NULL, 23, NULL, "ASCII");
+ memset(name, 0, 23 * sizeof(char));
+ if (s->samplename != NULL)
+ {
+ strncpy(name, s->samplename, 22);
+ name[22] = '\0';
+ code_convert(name, NULL, 23, NULL, "ASCII");
+ }
if(name[0] == '\0')
special_patch[i]->name = NULL;
else
--- timidity-2.13.2.orig/timidity/reverb.c
+++ timidity-2.13.2/timidity/reverb.c
@@ -1624,8 +1624,8 @@
buf[i] += r;
buf[++i] += l;
- if (++index0 == buf_size) {index0 = 0;}
- if (++buf_index == buf_size) {buf_index = 0;}
+ if (index0++ == buf_size) {index0 = 0;}
+ if (buf_index++ == buf_size) {buf_index = 0;}
}
memset(reverb_effect_buffer, 0, sizeof(int32) * count);
info->index[0] = index0;
--- timidity-2.13.2.orig/timidity/tables.c
+++ timidity-2.13.2/timidity/tables.c
@@ -1682,4 +1682,4 @@
420.0, 416.0, 412.0, 408.0, 405.0, 401.0, 397.0, 394.0,
390.0, 387.0, 383.0, 380.0, 377.0, 374.0, 371.0, 368.0,
364.0, 361.0, 359.0, 356.0, 353.0, 350.0, 347.0, 345.0,
-};
\ No newline at end of file
+};
--- timidity-2.13.2.orig/timidity/timidity.c
+++ timidity-2.13.2/timidity/timidity.c
@@ -5466,14 +5446,14 @@
static int CoInitializeOK = 0;
#endif
-static inline bool directory_p(const char* path)
+static inline int directory_p(const char* path)
{
#if defined ( IA_W32GUI ) || defined ( IA_W32G_SYN )
return is_directory(path);
#else
struct stat st;
if(stat(path, &st) != -1) return S_ISDIR(st.st_mode);
- return false;
+ return 0;
#endif
}
@@ -5649,11 +5629,11 @@
}
ctl->cmsg(CMSG_FATAL, VERB_NORMAL,
- "%s: Can't read any configuration file.\nPlease check "
+ "%s: Error reading configuration file.\nPlease check "
"%s or %s", program_name, config1, config2);
#else
ctl->cmsg(CMSG_FATAL, VERB_NORMAL,
- "%s: Can't read any configuration file.\nPlease check "
+ "%s: Error reading configuration file.\nPlease check "
CONFIG_FILE, program_name);
#endif /* __W32__ */
}
--- timidity-2.13.2.orig/timidity/wrd.h
+++ timidity-2.13.2/timidity/wrd.h
@@ -148,6 +148,7 @@
#endif
#include <limits.h>
#include "mblock.h"
+#include "common.h"
#include "controls.h"
static inline void print_ecmd(char *cmd, int *args, int narg)
{
--- timidity-2.13.2.orig/timidity/wrd_read.c
+++ timidity-2.13.2/timidity/wrd_read.c
@@ -1765,7 +1765,10 @@
#ifdef ENABLE_SHERRY
/*******************************************************************************/
+#if 0
+/* for mac only */
#pragma mark -
+#endif
static int sherry_started; /* 0 - before start command 0x01*/
/* 1 - after start command 0x01*/
TiMidity++-2.13.2-mlutil.patch:
--- NEW FILE TiMidity++-2.13.2-mlutil.patch ---
--- timidity-2.13.2.orig/libunimod/mlutil.c
+++ timidity-2.13.2/libunimod/mlutil.c
@@ -321,6 +321,7 @@
if (flags & UF_LINEAR)
{
period = lintab[period % 768] >> (period / 768);
+ if (period < 1) period = 1;
period = (8363L * 1712L) / period;
}
TiMidity++-2.13.2-speex.patch:
--- NEW FILE TiMidity++-2.13.2-speex.patch ---
diff -up TiMidity++-2.13.2/configure~ TiMidity++-2.13.2/configure
--- TiMidity++-2.13.2/configure~ 2007-12-10 13:22:49.000000000 +0100
+++ TiMidity++-2.13.2/configure 2007-12-10 13:22:49.000000000 +0100
@@ -14580,7 +14580,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- #include <speex.h>
+ #include <speex/speex.h>
#include <ogg/ogg.h>
int
diff -up TiMidity++-2.13.2/configure.in~ TiMidity++-2.13.2/configure.in
--- TiMidity++-2.13.2/configure.in~ 2007-12-10 13:23:01.000000000 +0100
+++ TiMidity++-2.13.2/configure.in 2007-12-10 13:23:01.000000000 +0100
@@ -1225,7 +1225,7 @@ AC_MSG_CHECKING(enable_audio=speex)
if test "x$au_enable_speex" = xyes; then
AC_CACHE_VAL(have_speex,
[AC_TRY_LINK([
- #include <speex.h>
+ #include <speex/speex.h>
#include <ogg/ogg.h>
],
[
diff -up TiMidity++-2.13.2/timidity/speex_a.c~ TiMidity++-2.13.2/timidity/speex_a.c
--- TiMidity++-2.13.2/timidity/speex_a.c~ 2007-12-10 13:23:13.000000000 +0100
+++ TiMidity++-2.13.2/timidity/speex_a.c 2007-12-10 13:23:13.000000000 +0100
@@ -33,8 +33,8 @@
#include <fcntl.h>
#endif
-#include <speex.h>
-#include <speex_header.h>
+#include <speex/speex.h>
+#include <speex/speex_header.h>
#include <ogg/ogg.h>
#include "timidity.h"
Index: timidity++.spec
===================================================================
RCS file: /cvs/extras/rpms/timidity++/devel/timidity++.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- timidity++.spec 14 Oct 2007 19:39:45 -0000 1.17
+++ timidity++.spec 10 Dec 2007 20:35:18 -0000 1.18
@@ -1,7 +1,7 @@
Summary: A software wavetable MIDI synthesizer
Name: timidity++
Version: 2.13.2
-Release: 4%{?dist}
+Release: 5%{?dist}
Group: Applications/Multimedia
Source: http://downloads.sourceforge.net/timidity/TiMidity++-%{version}.tar.bz2
Source1: http://archive.cs.umbc.edu/pub/midia/instruments.tar.bz2
@@ -14,10 +14,21 @@
Patch3: TiMidity++-2.13.0-detect.patch
Patch5: TiMidity++-2.13.0-64bit.patch
Patch6: TiMidity++-2.13.0-warnings.patch
+Patch7: TiMidity++-2.13.2-flac-detect.patch
+Patch8: TiMidity++-2.13.2-speex.patch
+Patch9: TiMidity++-2.13.2-libao-first.patch
+# The following patches are courtesy of Debian
+Patch10: TiMidity++-2.13.2-man-pages.patch
+Patch11: TiMidity++-2.13.2-misc-fixes.patch
+Patch12: TiMidity++-2.13.2-mlutil.patch
+Patch13: TiMidity++-2.13.2-flac.patch
+
License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: timidity++-X11
BuildRequires: arts-devel esound-devel alsa-lib-devel ncurses-devel gtk2-devel
+BuildRequires: libao-devel libvorbis-devel flac-devel speex-devel
+BuildRequires: jack-audio-connection-kit-devel
BuildRequires: desktop-file-utils
Requires: %{name}-patches = %{version}-%{release}, hicolor-icon-theme
@@ -47,14 +58,20 @@
# fix for x86_64 and s390x
%patch5 -p1 -b .64bit
%patch6 -p1 -b .warnings
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
%build
export EXTRACFLAGS="$RPM_OPT_FLAGS"
%configure --enable-dynamic --disable-dependency-tracking \
- --enable-interface=ncurses,slang,vt100,alsaseq,server,network,gtk \
- --enable-audio=oss,arts,alsa,esd,vorbis \
- --enable-gtk
+ --enable-interface=ncurses,vt100,alsaseq,server,network,gtk \
+ --enable-audio=oss,arts,alsa,esd,ao,jack,vorbis,speex,flac
make
@@ -115,6 +132,12 @@
%changelog
+* Mon Dec 10 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-5
+- Add patches to fix detect and compile of speex and flac outputs
+- Add various bugfixes from Debian
+- Enable ogg, flac, speex, libao and jack output formats (bz 412431)
+- Make libao the default output as libao support pulseaudio directly
+
* Sat Oct 13 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-4
- Split the patches of into a seperate sub package so that they can be used
by other wavetable midi synthesizers, without dragging in a bunch of unwanted
More information about the scm-commits
mailing list