diff options
Diffstat (limited to 'media-sound/hydrogen/files/hydrogen-0.9.3-flac113.patch')
-rw-r--r-- | media-sound/hydrogen/files/hydrogen-0.9.3-flac113.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/media-sound/hydrogen/files/hydrogen-0.9.3-flac113.patch b/media-sound/hydrogen/files/hydrogen-0.9.3-flac113.patch new file mode 100644 index 000000000000..29a263c26273 --- /dev/null +++ b/media-sound/hydrogen/files/hydrogen-0.9.3-flac113.patch @@ -0,0 +1,45 @@ +--- src/lib/FLACFile.cpp.old 2007-02-11 20:12:34.000000000 +0100 ++++ src/lib/FLACFile.cpp 2007-02-11 20:18:25.000000000 +0100 +@@ -33,6 +33,13 @@ + //#include "FLAC/file_decoder.h" + #include <FLAC++/all.h> + ++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 ++#define LEGACY_FLAC ++#else ++#undef LEGACY_FLAC ++#endif ++ ++ + /// Reads a FLAC file...not optimized yet + class FLACFile_real : public FLAC::Decoder::File, public Object + { +@@ -164,16 +171,28 @@ + } + + set_metadata_ignore_all(); ++ ++#ifdef LEGACY_FLAC + set_filename( sFilename.c_str() ); + + State s=init(); + if( s != FLAC__FILE_DECODER_OK ) { ++#else ++ FLAC__StreamDecoderInitStatus s=init(sFilename.c_str() ); ++ if(s!=FLAC__STREAM_DECODER_INIT_STATUS_OK) { ++#endif + errorLog( "[load] Error in init()" ); + } + ++#ifdef LEGACY_FLAC + if ( process_until_end_of_file() == false ) { + errorLog( "[load] Error in process_until_end_of_file()" ); + } ++#else ++ if ( process_until_end_of_stream() == false ) { ++ errorLog( "[load] Error in process_until_end_of_stream()" ); ++ } ++#endif + } + + |