#include <MpegAudioStream.hxx>
Public Member Functions | |
MpegAudioStream () | |
MpegAudioStream (const AudioFile &file) | |
~MpegAudioStream () | |
void | SetFOI (const AudioFile &file) |
void | PrepareReading () |
void | PrepareWriting () |
void | PrepareReadWrite () |
void | Dispose () |
Protected Member Functions | |
void | AudioFileToNative (const AudioFile &file) |
void | DiskToMemoryTransfer () |
void | MemoryToDiskTransfer () |
void | ConsumeDecodedSamples () |
Protected Attributes | |
std::string | mName |
FILE * | mpHandle |
MpegBitstream | mBitstream |
int | mEncodedSampleRate |
int | mEncodedChannels |
std::vector< std::deque < mad_fixed_t > > | mDecodeBuffer |
TSize | mSamplesDecoded |
TSize | mSamplesTransferred |
Static Protected Attributes | |
static const TSize | mMaxDecodedBlockSize = 8192 |
Definition at line 36 of file MpegAudioStream.hxx.
CLAM::AudioCodecs::MpegAudioStream::MpegAudioStream | ( | ) |
Definition at line 35 of file MpegAudioStream.cxx.
CLAM::AudioCodecs::MpegAudioStream::MpegAudioStream | ( | const AudioFile & | file | ) |
CLAM::AudioCodecs::MpegAudioStream::~MpegAudioStream | ( | ) |
void CLAM::AudioCodecs::MpegAudioStream::AudioFileToNative | ( | const AudioFile & | file | ) | [protected] |
Definition at line 67 of file MpegAudioStream.cxx.
References CLAM::AudioFile::GetHeader(), CLAM::AudioFile::GetLocation(), mDecodeBuffer, mEncodedChannels, mEncodedSampleRate, and mName.
Referenced by SetFOI().
void CLAM::AudioCodecs::MpegAudioStream::ConsumeDecodedSamples | ( | ) | [protected] |
Definition at line 164 of file MpegAudioStream.cxx.
References mDecodeBuffer, mEncodedChannels, CLAM::AudioCodecs::Stream::mInterleavedData, mSamplesTransferred, and CLAM::Array< T >::Size().
Referenced by DiskToMemoryTransfer().
void CLAM::AudioCodecs::MpegAudioStream::DiskToMemoryTransfer | ( | ) | [protected, virtual] |
Implements CLAM::AudioCodecs::Stream.
Definition at line 114 of file MpegAudioStream.cxx.
References CLAM_ASSERT, ConsumeDecodedSamples(), CLAM::AudioCodecs::MpegBitstream::CurrentFrame(), CLAM::AudioCodecs::MpegBitstream::CurrentSynthesis(), CLAM::AudioCodecs::MpegBitstream::EOS(), mBitstream, mDecodeBuffer, mEncodedChannels, CLAM::AudioCodecs::Stream::mEOFReached, CLAM::AudioCodecs::Stream::mFramesLastRead, CLAM::AudioCodecs::Stream::mInterleavedData, mSamplesDecoded, CLAM::AudioCodecs::MpegBitstream::NextFrame(), CLAM::Array< T >::Size(), and CLAM::AudioCodecs::MpegBitstream::SynthesizeCurrent().
void CLAM::AudioCodecs::MpegAudioStream::Dispose | ( | ) | [virtual] |
Implements CLAM::AudioCodecs::Stream.
Definition at line 109 of file MpegAudioStream.cxx.
References CLAM::AudioCodecs::MpegBitstream::Finish(), and mBitstream.
void CLAM::AudioCodecs::MpegAudioStream::MemoryToDiskTransfer | ( | ) | [protected, virtual] |
Implements CLAM::AudioCodecs::Stream.
Definition at line 199 of file MpegAudioStream.cxx.
References CLAM_ASSERT.
void CLAM::AudioCodecs::MpegAudioStream::PrepareReading | ( | ) | [virtual] |
Implements CLAM::AudioCodecs::Stream.
Definition at line 76 of file MpegAudioStream.cxx.
References CLAM_ASSERT, CLAM::AudioCodecs::MpegBitstream::Init(), CLAM::AudioCodecs::Stream::MarkAllChannelsAsConsumed(), mBitstream, mEncodedChannels, mName, mpHandle, mSamplesDecoded, mSamplesTransferred, and CLAM::AudioCodecs::Stream::SetChannels().
void CLAM::AudioCodecs::MpegAudioStream::PrepareReadWrite | ( | ) | [virtual] |
Implements CLAM::AudioCodecs::Stream.
Definition at line 104 of file MpegAudioStream.cxx.
References CLAM_ASSERT.
void CLAM::AudioCodecs::MpegAudioStream::PrepareWriting | ( | ) | [virtual] |
Implements CLAM::AudioCodecs::Stream.
Definition at line 99 of file MpegAudioStream.cxx.
References CLAM_ASSERT.
void CLAM::AudioCodecs::MpegAudioStream::SetFOI | ( | const AudioFile & | file | ) | [virtual] |
Implements CLAM::AudioCodecs::Stream.
Definition at line 62 of file MpegAudioStream.cxx.
References AudioFileToNative().
Referenced by MpegAudioStream().
Definition at line 65 of file MpegAudioStream.hxx.
Referenced by DiskToMemoryTransfer(), Dispose(), and PrepareReading().
std::vector<std::deque<mad_fixed_t> > CLAM::AudioCodecs::MpegAudioStream::mDecodeBuffer [protected] |
Definition at line 70 of file MpegAudioStream.hxx.
Referenced by AudioFileToNative(), ConsumeDecodedSamples(), and DiskToMemoryTransfer().
Definition at line 67 of file MpegAudioStream.hxx.
Referenced by AudioFileToNative(), ConsumeDecodedSamples(), DiskToMemoryTransfer(), and PrepareReading().
const TSize CLAM::AudioCodecs::MpegAudioStream::mMaxDecodedBlockSize = 8192 [static, protected] |
Definition at line 69 of file MpegAudioStream.hxx.
std::string CLAM::AudioCodecs::MpegAudioStream::mName [protected] |
Definition at line 63 of file MpegAudioStream.hxx.
Referenced by AudioFileToNative(), PrepareReading(), and ~MpegAudioStream().
FILE* CLAM::AudioCodecs::MpegAudioStream::mpHandle [protected] |
Definition at line 64 of file MpegAudioStream.hxx.
Referenced by PrepareReading(), and ~MpegAudioStream().
Definition at line 71 of file MpegAudioStream.hxx.
Referenced by DiskToMemoryTransfer(), and PrepareReading().
Definition at line 72 of file MpegAudioStream.hxx.
Referenced by ConsumeDecodedSamples(), and PrepareReading().