--- rezound-0.12.3beta/src/backend/CFLACSoundTranslator.cpp.ark 2007-08-09 12:41:25.000000000 +0200 +++ rezound-0.12.3beta/src/backend/CFLACSoundTranslator.cpp 2007-08-09 12:56:22.000000000 +0200 @@ -75,15 +75,13 @@ for(unsigned t=0;t<MAX_CHANNELS;t++) accessers[t]=NULL; - set_filename(filename.c_str()); - set_metadata_ignore_all(); //set_metadata_respond(FLAC__METADATA_TYPE_VORBIS_COMMENT); //set_metadata_respond(FLAC__METADATA_TYPE_CUESHEET); - 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]); } virtual ~MyFLACDecoderFile() @@ -170,7 +168,7 @@ // update status bar and detect user cancel FLAC__uint64 filePosition; - FLAC__file_decoder_get_decode_position(decoder_, &filePosition); + FLAC__stream_decoder_get_decode_position(decoder_, &filePosition); return statusBar.update(filePosition) ? FLAC__STREAM_DECODER_WRITE_STATUS_ABORT : FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; } @@ -215,7 +213,7 @@ bool CFLACSoundTranslator::onLoadSound(const string filename,CSound *sound) const { MyFLACDecoderFile f(filename,sound); - return f.process_until_end_of_file(); + return f.process_until_end_of_stream(); } @@ -258,8 +256,6 @@ MyFLACEncoderFile f(saveLength); - f.set_filename(filename.c_str()); - f.set_channels(sound->getChannelCount()); /* ??? needs to be a user choice */ @@ -274,8 +270,8 @@ //f.set_metadata(...) // ??? to do to set cues and user notes, etc - 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) { #define BUFFER_SIZE 65536 TAutoBuffer<FLAC__int32> buffers[MAX_CHANNELS]; @@ -328,7 +324,7 @@ return true; } else - throw runtime_error(string(__func__)+" -- error creating FLAC encoder -- "+s.as_cstring()); + throw runtime_error(string(__func__)+" -- error creating FLAC encoder -- "+FLAC__StreamEncoderInitStatusString[s]); }