# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../rezound/flac-1.1.3.patch # Copyright (C) 2007 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- rezound-0.12.2beta/src/backend/CFLACSoundTranslator.cpp.old 2006-12-04 19:08:26.000000000 +0100 +++ rezound-0.12.2beta/src/backend/CFLACSoundTranslator.cpp 2006-12-04 19:33:45.000000000 +0100 @@ -42,6 +42,12 @@ #include "CSound.h" #include "AStatusComm.h" +#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 +#define LEGACY_FLAC +#else +#undef LEGACY_FLAC +#endif + CFLACSoundTranslator::CFLACSoundTranslator() { } @@ -75,15 +81,23 @@ for(unsigned t=0;tgetChannelCount()); @@ -274,8 +298,13 @@ //f.set_metadata(...) // ??? to do to set cues and user notes, etc +#ifdef LEGACY_FLAC MyFLACEncoderFile::State s=f.init(); if(s==FLAC__STREAM_ENCODER_OK) +#else + FLAC__StreamEncoderInitStatus s=f.init(filename.c_str()); + if(s==FLAC__STREAM_ENCODER_INIT_STATUS_OK) +#endif { #define BUFFER_SIZE 65536 TAutoBuffer buffers[MAX_CHANNELS]; @@ -328,7 +357,11 @@ return true; } else +#ifdef LEGACY_FLAC throw runtime_error(string(__func__)+" -- error creating FLAC encoder -- "+s.as_cstring()); +#else + throw runtime_error(string(__func__)+" -- error creating FLAC encoder -- "); +#endif }