SOURCES: audacity-flac.patch (NEW) - update for flac 1.1.3 API

qboosh qboosh at pld-linux.org
Fri Dec 29 04:49:08 CET 2006


Author: qboosh                       Date: Fri Dec 29 03:49:08 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- update for flac 1.1.3 API

---- Files affected:
SOURCES:
   audacity-flac.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/audacity-flac.patch
diff -u /dev/null SOURCES/audacity-flac.patch:1.1
--- /dev/null	Fri Dec 29 04:49:08 2006
+++ SOURCES/audacity-flac.patch	Fri Dec 29 04:49:03 2006
@@ -0,0 +1,63 @@
+--- audacity-src-1.3.2-beta/acinclude.m4.orig	2006-10-29 01:06:04.000000000 +0200
++++ audacity-src-1.3.2-beta/acinclude.m4	2006-12-29 01:37:20.738111908 +0100
+@@ -467,7 +467,7 @@
+    dnl See if FLAC is installed in the system
+ 
+    AC_CHECK_LIB(FLAC,
+-                FLAC__file_decoder_new,
++                FLAC__stream_decoder_init_file,
+                 lib_found="yes",
+                 lib_found="no",
+                 -lFLAC++ -lFLAC)
+--- audacity-src-1.3.2-beta/src/import/ImportFLAC.cpp.orig	2006-10-29 01:05:28.000000000 +0200
++++ audacity-src-1.3.2-beta/src/import/ImportFLAC.cpp	2006-12-29 02:15:32.764727062 +0100
+@@ -264,17 +264,13 @@
+ 
+ bool FLACImportFileHandle::Init()
+ {
+-   bool success = mFile->set_filename(OSFILENAME(mName));
+-   if (!success) {
+-      return false;
+-   }
+-   FLAC::Decoder::File::State state = mFile->init();
+-   if (state != FLAC__FILE_DECODER_OK) {
++   FLAC__StreamDecoderInitStatus initstate = mFile->init(OSFILENAME(mName));
++   if (initstate != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
+       return false;
+    }
+    mFile->process_until_end_of_metadata();
+-   state = mFile->get_state();
+-   if (state != FLAC__FILE_DECODER_OK) {
++   FLAC::Decoder::Stream::State state = mFile->get_state();
++   if (state >= FLAC__STREAM_DECODER_END_OF_STREAM) {
+       return false;
+    }
+    if (!mFile->is_valid() || mFile->get_was_error())
+@@ -340,7 +336,7 @@
+       mChannels[1]->SetTeamed(true);
+    }
+ 
+-   mFile->process_until_end_of_file();
++   mFile->process_until_end_of_stream();
+    
+    *outTracks = new Track *[*outNumTracks];
+    for(c = 0; c < *outNumTracks; c++) {
+--- audacity-src-1.3.2-beta/src/export/ExportFLAC.cpp.orig	2006-10-29 01:05:27.000000000 +0200
++++ audacity-src-1.3.2-beta/src/export/ExportFLAC.cpp	2006-12-29 04:06:39.436639042 +0100
+@@ -58,7 +58,6 @@
+       gPrefs->Read(wxT("/FileFormats/FLACBitDepth"), wxT("16"));
+    
+    FLAC::Encoder::File *encoder= new FLAC::Encoder::File();
+-   encoder->set_filename(OSFILENAME(fName));
+    encoder->set_channels(numChannels);
+    encoder->set_sample_rate(int(rate + 0.5));
+ 
+@@ -72,7 +71,7 @@
+     	format=int16Sample;
+    	encoder->set_bits_per_sample(16);
+    }
+-   encoder->init();
++   encoder->init(OSFILENAME(fName));
+    
+    int numWaveTracks;
+    WaveTrack **waveTracks;
================================================================


More information about the pld-cvs-commit mailing list