The MPC_decoder class now contains a pointer to the StreamInfo set by
SetStreamInfo() (because MusePackDecoder can use this data). Removed some other unused lines. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6163 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7854985f97
commit
e74116611d
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user