[Demudi-commits] r1461 - in timidity/trunk: debian timidity

andete-guest at alioth.debian.org andete-guest at alioth.debian.org
Sun Jun 10 08:08:37 UTC 2007


Author: andete-guest
Date: 2007-06-10 08:08:37 +0000 (Sun, 10 Jun 2007)
New Revision: 1461

Modified:
   timidity/trunk/debian/changelog
   timidity/trunk/debian/control
   timidity/trunk/timidity/flac_a.c
   timidity/trunk/timidity/timidity.c
Log:
WIP


Modified: timidity/trunk/debian/changelog
===================================================================
--- timidity/trunk/debian/changelog	2007-06-08 20:08:09 UTC (rev 1460)
+++ timidity/trunk/debian/changelog	2007-06-10 08:08:37 UTC (rev 1461)
@@ -1,3 +1,10 @@
+timidity (2.13.2-13) UNRELEASED; urgency=low
+
+  * Make work with flac 1.1.4 API (Closes: #426669, #427593)
+  * Fix lintian warning about Source-Version
+
+ -- Joost Yervante Damad <andete at debian.org>  Sun, 10 Jun 2007 09:52:13 +0200
+
 timidity (2.13.2-12) unstable; urgency=low
 
   * honor CFLAGS (Closes: #421502)

Modified: timidity/trunk/debian/control
===================================================================
--- timidity/trunk/debian/control	2007-06-08 20:08:09 UTC (rev 1460)
+++ timidity/trunk/debian/control	2007-06-10 08:08:37 UTC (rev 1461)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Multimedia Team <debian-multimedia at lists.debian.org>
 Uploaders: Joost Yervante Damad <andete at debian.org>
-Build-Depends: debhelper (>= 4), libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libaudiofile-dev, libesd0-dev, libarts1-dev, libjack0.100.0-dev, libaudio-dev, libvorbis-dev (>= 1.0.0-3), libspeex-dev (>= 1.0), liboggflac-dev (>= 1.1.2-1), libflac-dev (>= 1.1.2-1), libncurses-dev, libslang2-dev, libx11-dev, libxext-dev, libxmu-dev, libxpm-dev, libxt-dev, x-dev, libxaw7-dev, tcl8.4-dev, tk8.4-dev, libgtk2.0-dev, autotools-dev,  dpkg-dev (>= 1.13.19)
+Build-Depends: debhelper (>= 4), libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libaudiofile-dev, libesd0-dev, libarts1-dev, libjack0.100.0-dev, libaudio-dev, libvorbis-dev (>= 1.0.0-3), libspeex-dev (>= 1.0), libflac-dev (>= 1.1.4-1), libncurses-dev, libslang2-dev, libx11-dev, libxext-dev, libxmu-dev, libxpm-dev, libxt-dev, x-dev, libxaw7-dev, tcl8.4-dev, tk8.4-dev, libgtk2.0-dev, autotools-dev,  dpkg-dev (>= 1.13.19)
 Standards-Version: 3.7.2
 
 Package: timidity
@@ -35,7 +35,7 @@
 
 Package: timidity-interfaces-extra
 Architecture: any
-Depends: ${shlibs:Depends}, timidity (= ${Source-Version})
+Depends: ${shlibs:Depends}, timidity (= ${binary:Version})
 Replaces: timidity (<< 2.12.0)
 Description: TiMidity++ extra user interfaces
  TiMidity++ is a very high quality software-only MIDI sequencer and MOD 

Modified: timidity/trunk/timidity/flac_a.c
===================================================================
--- timidity/trunk/timidity/flac_a.c	2007-06-08 20:08:09 UTC (rev 1460)
+++ timidity/trunk/timidity/flac_a.c	2007-06-10 08:08:37 UTC (rev 1461)
@@ -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,7 +157,7 @@
 						  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);
@@ -275,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()
 {
@@ -292,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
@@ -368,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++;
@@ -386,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",
@@ -396,54 +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);
+    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_blocksize(ctx->encoder.ogg.stream, flac_options.blocksize);
+    FLAC__stream_encoder_set_blocksize(ctx->encoder.ogg.stream, flac_options.blocksize);
 
-    OggFLAC__stream_encoder_set_client_data(ctx->encoder.ogg.stream, ctx);
-
     if (0 < num_metadata)
-      OggFLAC__stream_encoder_set_metadata(ctx->encoder.ogg.stream, metadata, num_metadata);
+      FLAC__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);
-
-    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) {
     /* FLAC SEEKABLE STREAM */
-    if ((ctx->encoder.flac.s_stream = FLAC__seekable_stream_encoder_new()) == NULL) {
+    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",
@@ -451,34 +427,35 @@
       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_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;
     }
@@ -518,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]);
@@ -543,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);
@@ -552,7 +528,6 @@
 #endif
   }
   else
-#endif /* AU_OGGFLAC */
   {
 #ifndef __W32G__
     output_filename = create_auto_output_name(input_filename, "flac", NULL, 0);
@@ -601,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) {
@@ -631,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)
@@ -647,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[],
@@ -668,22 +639,7 @@
 						  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 int output_data(char *buf, int32 nbytes)
 {
   FLAC__int32 *oggbuf;
@@ -711,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();
@@ -733,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();
@@ -802,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 */
     }
 	}

Modified: timidity/trunk/timidity/timidity.c
===================================================================
--- timidity/trunk/timidity/timidity.c	2007-06-08 20:08:09 UTC (rev 1460)
+++ timidity/trunk/timidity/timidity.c	2007-06-10 08:08:37 UTC (rev 1461)
@@ -301,9 +301,7 @@
 	{ "flac-verify",            no_argument,       NULL, TIM_OPT_FLAC_VERIFY },
 	{ "flac-padding",           required_argument, NULL, TIM_OPT_FLAC_PADDING },
 	{ "flac-complevel",         required_argument, NULL, TIM_OPT_FLAC_COMPLEVEL },
-#ifdef AU_OGGFLAC
 	{ "oggflac",                no_argument,       NULL, TIM_OPT_FLAC_OGGFLAC },
-#endif /* AU_OGGFLAC */
 #endif /* AU_FLAC */
 #ifdef AU_SPEEX
 	{ "speex-quality",          required_argument, NULL, TIM_OPT_SPEEX_QUALITY },
@@ -439,9 +437,7 @@
 static inline int parse_opt_flac_verify(const char *);
 static inline int parse_opt_flac_padding(const char *);
 static inline int parse_opt_flac_complevel(const char *);
-#ifdef AU_OGGFLAC
 static inline int parse_opt_flac_oggflac(const char *);
-#endif /* AU_OGGFLAC */
 #endif /* AU_FLAC */
 #ifdef AU_SPEEX
 static inline int parse_opt_speex_quality(const char *);
@@ -2779,10 +2775,8 @@
 		return parse_opt_flac_padding(arg);
 	case TIM_OPT_FLAC_COMPLEVEL:
 		return parse_opt_flac_complevel(arg);
-#ifdef AU_OGGFLAC
 	case TIM_OPT_FLAC_OGGFLAC:
 		return parse_opt_flac_oggflac(arg);
-#endif /* AU_OGGFLAC */
 #endif /* AU_FLAC */
 #ifdef AU_SPEEX
 	case TIM_OPT_SPEEX_QUALITY:
@@ -3632,10 +3626,8 @@
 "               Write a PADDING block of length n",
 "             --flac-complevel=n (for Ogg FLAC only)",
 "               Set compression level n:[0..8]",
-#ifdef AU_OGGFLAC
 "             --oggflac (for Ogg FLAC only)",
 "               Output OggFLAC stream (experimental)",
-#endif /* AU_OGGFLAC */
 #endif /* AU_FLAC */
 #ifdef AU_SPEEX
 "             --speex-quality=n (for Ogg Speex only)",
@@ -4371,7 +4363,6 @@
 	return 0;
 }
 
-#ifdef AU_OGGFLAC
 extern void flac_set_option_oggflac(int);
 
 static inline int parse_opt_flac_oggflac(const char *arg)
@@ -4379,7 +4370,6 @@
 	flac_set_option_oggflac(1);
 	return 0;
 }
-#endif /* AU_OGGFLAC */
 #endif /* AU_FLAC */
 
 #ifdef AU_SPEEX




More information about the Demudi-commits mailing list