Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#125 rezound doesn't compile with current FLAC versions

closed-fixed
Davy Durham
5
2010-02-27
2007-07-04
No

The FLAC API has undergone some major changes in version 1.1.3 (current is 1.1.4); rezound no longer compiles.

CFLACSoundTranslator.cpp: In constructor 'MyFLACDecoderFile::MyFLACDecoderFile(std::string, CSound*)':
CFLACSoundTranslator.cpp:78: error: 'set_filename' was not declared in this scope
CFLACSoundTranslator.cpp:84: error: no matching function for call to 'MyFLACDecoderFile::init()'
/usr/include/FLAC++/decoder.h:226: note: candidates are: virtual FLAC__StreamDecoderInitStatus FLAC::Decoder::File::init(FILE*)
/usr/include/FLAC++/decoder.h:227: note: virtual FLAC__StreamDecoderInitStatus FLAC::Decoder::File::init(const char*)
/usr/include/FLAC++/decoder.h:228: note: virtual FLAC__StreamDecoderInitStatus FLAC::Decoder::File::init(const std::string&)
CFLACSoundTranslator.cpp:85: error: 'FLAC__FILE_DECODER_OK' was not declared in this scope
CFLACSoundTranslator.cpp: In member function 'virtual FLAC__StreamDecoderWriteStatus MyFLACDecoderFile::write_callback(const FLAC__Frame*, const FLAC__int32* const*)':
CFLACSoundTranslator.cpp:173: error: 'FLAC__file_decoder_get_decode_position' was not declared in this scope
CFLACSoundTranslator.cpp: In member function 'virtual bool CFLACSoundTranslator::onLoadSound(std::string, CSound*) const':
CFLACSoundTranslator.cpp:218: error: 'class MyFLACDecoderFile' has no member named 'process_until_end_of_file'
CFLACSoundTranslator.cpp: In member function 'virtual bool CFLACSoundTranslator::onSaveSound(std::string, const CSound*, sample_pos_t, sample_pos_t, bool) const':
CFLACSoundTranslator.cpp:261: error: 'class MyFLACEncoderFile' has no member named 'set_filename'
CFLACSoundTranslator.cpp:277: error: no matching function for call to 'MyFLACEncoderFile::init()'
/usr/include/FLAC++/encoder.h:237: note: candidates are: virtual FLAC__StreamEncoderInitStatus FLAC::Encoder::File::init(FILE*)
/usr/include/FLAC++/encoder.h:238: note: virtual FLAC__StreamEncoderInitStatus FLAC::Encoder::File::init(const char*)
/usr/include/FLAC++/encoder.h:239: note: virtual FLAC__StreamEncoderInitStatus FLAC::Encoder::File::init(const std::string&)

Discussion

  • Logged In: YES
    user_id=249312
    Originator: NO

    Only to confirm this while trying to build on 64-bit Linux (F7) with FLAC 1.1.4

    Is there a way to disable FLAC (just to test that ReZound actually builds now on 64-bits)? I don't see any --disable-FLAC or --with-FLAC=no options in the ./configure.

     
  • v4hn
    v4hn
    2008-06-07

    Logged In: YES
    user_id=1726156
    Originator: NO

    Here's a quick and dirty patch - works for flac 1.2.1(current):

    --- src/backend/CFLACSoundTranslator.cpp 2005-05-01 06:39:38.000000000 +0200
    +++ src/backend/CFLACSoundTranslator.cpp 2008-06-07 20:53:44.000000000 +0200
    @@ -78,2 +77,0 @@
    - set_filename(filename.c_str());
    -
    @@ -84,3 +82,3 @@
    - State s=init();
    - if(s!=FLAC__FILE_DECODER_OK)
    - throw runtime_error(string(__func__)+" -- "+s.as_cstring());
    + FLAC__StreamDecoderInitStatus s= init(filename.c_str());
    + if(s!=FLAC__STREAM_DECODER_INIT_STATUS_OK)
    + throw runtime_error(string(__func__)+" -- "+FLAC__StreamDecoderInitStatusString[s]);
    @@ -173 +171 @@
    - FLAC__file_decoder_get_decode_position(decoder_, &filePosition);
    + FLAC__stream_decoder_get_decode_position(decoder_, &filePosition);
    @@ -218 +216 @@
    - return f.process_until_end_of_file();
    + return f.process_until_end_of_stream();
    @@ -261,2 +258,0 @@
    - f.set_filename(filename.c_str());
    -
    @@ -277,2 +273,2 @@
    - MyFLACEncoderFile::State s=f.init();
    - if(s==FLAC__STREAM_ENCODER_OK)
    + FLAC__StreamEncoderInitStatus s=f.init(filename.c_str());
    + if(s==FLAC__STREAM_ENCODER_INIT_STATUS_OK)
    @@ -331 +327 @@
    - throw runtime_error(string(__func__)+" -- error creating FLAC encoder -- "+s.as_cstring());
    + throw runtime_error(string(__func__)+" -- error creating FLAC encoder -- "+FLAC__StreamEncoderInitStatusString[s]);

     
  • Davy Durham
    Davy Durham
    2010-02-27

    fixed

     
  • Davy Durham
    Davy Durham
    2010-02-27

    • assigned_to: nobody --> ddurham
    • status: open --> closed-fixed