diff --git a/src/add-ons/media/plugins/musepack/mpc/mpc_dec.cpp b/src/add-ons/media/plugins/musepack/mpc/mpc_dec.cpp index e8b266fd1f..cc6e4e376d 100644 --- a/src/add-ons/media/plugins/musepack/mpc/mpc_dec.cpp +++ b/src/add-ons/media/plugins/musepack/mpc/mpc_dec.cpp @@ -194,6 +194,8 @@ MPC_decoder::DECODE ( MPC_SAMPLE_FORMAT *buffer ) #endif Synthese_Filter_dithered ( buffer ); +#else +# error Define MPC_DECODE to either TO_FLOAT or TO_PCM #endif // (PluginSettings.DitherUsed ? this->Synthese_Filter_dithered : this->Synthese_Filter_opt) ( (short*)buffer ); @@ -978,8 +980,13 @@ MPC_decoder::MPC_decoder(BPositionIO *file) Huffman_SV7_Decoder (); } -void MPC_decoder::SetStreamInfo ( StreamInfo *si ) + +void +MPC_decoder::SetStreamInfo(StreamInfo *si) { + fInfo = si; + // this is used in MusePackDecoder::NegotiateOutputFormat() + StreamVersion = si->simple.StreamVersion; MS_used = si->simple.MS; Max_Band = si->simple.MaxBand; diff --git a/src/add-ons/media/plugins/musepack/mpc/mpc_dec.h b/src/add-ons/media/plugins/musepack/mpc/mpc_dec.h index b99f0c1a4a..b9c1a47299 100644 --- a/src/add-ons/media/plugins/musepack/mpc/mpc_dec.h +++ b/src/add-ons/media/plugins/musepack/mpc/mpc_dec.h @@ -13,7 +13,7 @@ class StreamInfo; #define TO_PCM 2 #ifndef MPC_DECODE - #define MPC_DECODE TO_FLOAT // decode to 32 bit floats ( -1.000...+1.000 ) +#define MPC_DECODE TO_FLOAT // decode to 32 bit floats ( -1.000...+1.000 ) //#define MPC_DECODE TO_PCM // decode to 16 bit PCM ( -32768...+32767 ) #endif @@ -43,17 +43,6 @@ class StreamInfo; #define SYNTH_DELAY 481 -class Reader { -public: - virtual size_t read ( void *ptr, size_t size ) = 0; - virtual size_t write ( void *ptr, size_t size ) = 0; - virtual int seek ( int offset, int origin ) = 0; - virtual long tell () = 0; - virtual void seteof ( size_t ofs ) {}; - virtual ~Reader () {} - virtual int canwrite () { return 0; }; // is writing supported or not -}; - class MPC_decoder { private: BPositionIO *m_reader; @@ -114,6 +103,7 @@ public: int SectionBitrate; // average bitrate for short section int SampleRate; // Sample frequency int NumberOfConsecutiveBrokenFrames; // counter for consecutive broken frames + StreamInfo *fInfo; private: unsigned int StreamVersion; // version of bitstream