This patch adds ifdefs to make rezound compile and work with flac 1.1.2 and >=1.1.3 See : http://flac.sourceforge.net/api/group__porting.html for more details Index: rezound-0.12.3beta/src/backend/CFLACSoundTranslator.cpp =================================================================== --- rezound-0.12.3beta.orig/src/backend/CFLACSoundTranslator.cpp +++ rezound-0.12.3beta/src/backend/CFLACSoundTranslator.cpp @@ -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 @@ public: for(unsigned t=0;tgetChannelCount()); @@ -274,8 +298,13 @@ bool CFLACSoundTranslator::onSaveSound(c //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 @@ bool CFLACSoundTranslator::onSaveSound(c 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 }