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:
@@ -194,6 +194,8 @@ MPC_decoder::DECODE ( MPC_SAMPLE_FORMAT *buffer )
|
|||||||
#endif
|
#endif
|
||||||
Synthese_Filter_dithered ( buffer );
|
Synthese_Filter_dithered ( buffer );
|
||||||
|
|
||||||
|
#else
|
||||||
|
# error Define MPC_DECODE to either TO_FLOAT or TO_PCM
|
||||||
#endif
|
#endif
|
||||||
// (PluginSettings.DitherUsed ? this->Synthese_Filter_dithered : this->Synthese_Filter_opt) ( (short*)buffer );
|
// (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 ();
|
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;
|
StreamVersion = si->simple.StreamVersion;
|
||||||
MS_used = si->simple.MS;
|
MS_used = si->simple.MS;
|
||||||
Max_Band = si->simple.MaxBand;
|
Max_Band = si->simple.MaxBand;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class StreamInfo;
|
|||||||
#define TO_PCM 2
|
#define TO_PCM 2
|
||||||
|
|
||||||
#ifndef MPC_DECODE
|
#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 )
|
//#define MPC_DECODE TO_PCM // decode to 16 bit PCM ( -32768...+32767 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -43,17 +43,6 @@ class StreamInfo;
|
|||||||
#define SYNTH_DELAY 481
|
#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 {
|
class MPC_decoder {
|
||||||
private:
|
private:
|
||||||
BPositionIO *m_reader;
|
BPositionIO *m_reader;
|
||||||
@@ -114,6 +103,7 @@ public:
|
|||||||
int SectionBitrate; // average bitrate for short section
|
int SectionBitrate; // average bitrate for short section
|
||||||
int SampleRate; // Sample frequency
|
int SampleRate; // Sample frequency
|
||||||
int NumberOfConsecutiveBrokenFrames; // counter for consecutive broken frames
|
int NumberOfConsecutiveBrokenFrames; // counter for consecutive broken frames
|
||||||
|
StreamInfo *fInfo;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int StreamVersion; // version of bitstream
|
unsigned int StreamVersion; // version of bitstream
|
||||||
|
|||||||
Reference in New Issue
Block a user