ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge
Inheritance diagram for Audio::BaseMP3Stream:
Collaboration diagram for Audio::BaseMP3Stream:

List of all members.

Public Member Functions

 BaseMP3Stream ()
virtual ~BaseMP3Stream ()
bool endOfData () const
 End of data reached? If this returns true, it means that at this time there is no data available in the stream.
bool isStereo () const
 Is this a stereo stream?
int getRate () const
 Sample rate of the stream.

Protected Types

enum  State { MP3_STATE_INIT, MP3_STATE_READY, MP3_STATE_EOS }
enum  { BUFFER_SIZE = 5 * 8192 }

Protected Member Functions

void decodeMP3Data (Common::ReadStream &stream)
void readMP3Data (Common::ReadStream &stream)
void initStream (Common::ReadStream &stream)
void readHeader (Common::ReadStream &stream)
void deinitStream ()
int fillBuffer (Common::ReadStream &stream, int16 *buffer, const int numSamples)

Protected Attributes

uint _posInFrame
State _state
mad_timer_t _curTime
mad_stream _stream
mad_frame _frame
mad_synth _synth
uint _channels
uint _rate
byte _buf [BUFFER_SIZE+MAD_BUFFER_GUARD]

Detailed Description

Definition at line 51 of file mp3.cpp.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
BUFFER_SIZE 

Definition at line 88 of file mp3.cpp.

enum Audio::BaseMP3Stream::State [protected]
Enumerator:
MP3_STATE_INIT 
MP3_STATE_READY 
MP3_STATE_EOS 

Definition at line 70 of file mp3.cpp.


Constructor & Destructor Documentation

Audio::BaseMP3Stream::BaseMP3Stream (  ) 

Definition at line 136 of file mp3.cpp.

Audio::BaseMP3Stream::~BaseMP3Stream (  )  [virtual]

Definition at line 147 of file mp3.cpp.


Member Function Documentation

void Audio::BaseMP3Stream::decodeMP3Data ( Common::ReadStream stream  )  [protected]

Definition at line 151 of file mp3.cpp.

void Audio::BaseMP3Stream::deinitStream (  )  [protected]

Definition at line 281 of file mp3.cpp.

bool Audio::BaseMP3Stream::endOfData (  )  const [inline, virtual]

End of data reached? If this returns true, it means that at this time there is no data available in the stream.

However there may be more data in the future. This is used by e.g. a rate converter to decide whether to keep on converting data or stop.

Implements Audio::AudioStream.

Definition at line 56 of file mp3.cpp.

int Audio::BaseMP3Stream::fillBuffer ( Common::ReadStream stream,
int16 buffer,
const int  numSamples 
) [protected]

Definition at line 307 of file mp3.cpp.

int Audio::BaseMP3Stream::getRate (  )  const [inline, virtual]

Sample rate of the stream.

Implements Audio::AudioStream.

Definition at line 58 of file mp3.cpp.

void Audio::BaseMP3Stream::initStream ( Common::ReadStream stream  )  [protected]

Definition at line 225 of file mp3.cpp.

bool Audio::BaseMP3Stream::isStereo (  )  const [inline, virtual]

Is this a stereo stream?

Implements Audio::AudioStream.

Definition at line 57 of file mp3.cpp.

void Audio::BaseMP3Stream::readHeader ( Common::ReadStream stream  )  [protected]

Definition at line 245 of file mp3.cpp.

void Audio::BaseMP3Stream::readMP3Data ( Common::ReadStream stream  )  [protected]

Definition at line 195 of file mp3.cpp.


Member Data Documentation

byte Audio::BaseMP3Stream::_buf[BUFFER_SIZE+MAD_BUFFER_GUARD] [protected]

Definition at line 93 of file mp3.cpp.

Definition at line 85 of file mp3.cpp.

mad_timer_t Audio::BaseMP3Stream::_curTime [protected]

Definition at line 79 of file mp3.cpp.

mad_frame Audio::BaseMP3Stream::_frame [protected]

Definition at line 82 of file mp3.cpp.

Definition at line 76 of file mp3.cpp.

Definition at line 86 of file mp3.cpp.

Definition at line 77 of file mp3.cpp.

mad_stream Audio::BaseMP3Stream::_stream [protected]

Definition at line 81 of file mp3.cpp.

mad_synth Audio::BaseMP3Stream::_synth [protected]

Definition at line 83 of file mp3.cpp.


The documentation for this class was generated from the following file:


Generated on Sat Mar 16 2019 05:05:21 for ResidualVM by doxygen 1.7.1
curved edge   curved edge