CLAM-Development
1.4.0
|
#include <MpegAudioStream.hxx>
Public Member Functions | |
MpegAudioStream (const AudioFile &file) | |
~MpegAudioStream () | |
void | PrepareReading () |
Open the stream in read mode. | |
void | PrepareWriting () |
Open the stream in write mode. | |
void | Dispose () |
Close the stream. | |
void | SeekTo (unsigned long framePosition) |
Moves the current position to framePosition. If such functionality is not supported by the stream it will be ignored. | |
![]() | |
Stream () | |
virtual | ~Stream () |
virtual unsigned long | GetFramePosition () const |
Returns the current frame position. | |
bool | ReadData (int channel, TData *buffer, unsigned nFrames) |
Read a picked channel. | |
bool | ReadData (TData **buffers, unsigned nFrames) |
Read all the channels. | |
bool | ReadData (int *channels, int nchannels, TData **buffers, unsigned nFrames) |
Read many picked channels. | |
void | WriteData (int channel, const TData *buffer, unsigned nFrames) |
Read a picked channel (Do it has sense?) | |
void | WriteData (TData **const buffers, unsigned nFrames) |
Read all the channels. | |
void | WriteData (int *channels, int nchannels, TData **const buffers, unsigned nFrames) |
Read many picked channels (Do it has sense?) |
Protected Member Functions | |
void | DiskToMemoryTransfer () |
Move data from the file to mInterleavedData. | |
void | MemoryToDiskTransfer () |
Move data from mInterleavedData to the file. | |
![]() | |
void | SetChannels (unsigned nChannels) |
Additional Inherited Members | |
![]() | |
unsigned | mChannels |
std::vector< TData > | mInterleavedData |
bool | mEOFReached |
unsigned | mFramesLastRead |
unsigned long | mFramePosition |
Definition at line 36 of file MpegAudioStream.hxx.
CLAM::AudioCodecs::MpegAudioStream::MpegAudioStream | ( | const AudioFile & | file | ) |
Definition at line 35 of file MpegAudioStream.cxx.
References CLAM::AudioFile::GetHeader(), CLAM::AudioFile::GetLocation(), and CLAM::AudioCodecs::Stream::mChannels.
CLAM::AudioCodecs::MpegAudioStream::~MpegAudioStream | ( | ) |
Definition at line 44 of file MpegAudioStream.cxx.
|
protectedvirtual |
Move data from the file to mInterleavedData.
Implements CLAM::AudioCodecs::Stream.
Definition at line 80 of file MpegAudioStream.cxx.
References CLAM_ASSERT, CLAM_WARNING, CLAM::AudioCodecs::MpegBitstream::CurrentFrame(), CLAM::AudioCodecs::MpegBitstream::CurrentFrameFileOffset(), CLAM::AudioCodecs::MpegBitstream::CurrentSynthesis(), CLAM::AudioCodecs::MpegBitstream::EOS(), CLAM::AudioCodecs::Stream::mChannels, CLAM::AudioCodecs::Stream::mEOFReached, CLAM::AudioCodecs::Stream::mFramesLastRead, CLAM::AudioCodecs::Stream::mInterleavedData, CLAM::AudioCodecs::MpegBitstream::NextFrame(), and CLAM::AudioCodecs::MpegBitstream::SynthesizeCurrent().
|
virtual |
Close the stream.
Implements CLAM::AudioCodecs::Stream.
Definition at line 75 of file MpegAudioStream.cxx.
References CLAM::AudioCodecs::MpegBitstream::Finish().
|
protectedvirtual |
Move data from mInterleavedData to the file.
Implements CLAM::AudioCodecs::Stream.
Definition at line 169 of file MpegAudioStream.cxx.
References CLAM_ASSERT.
|
virtual |
Open the stream in read mode.
Implements CLAM::AudioCodecs::Stream.
Definition at line 50 of file MpegAudioStream.cxx.
References CLAM_ASSERT, CLAM::AudioCodecs::MpegBitstream::Init(), and CLAM::AudioCodecs::Stream::mFramePosition.
|
virtual |
Open the stream in write mode.
Implements CLAM::AudioCodecs::Stream.
Definition at line 70 of file MpegAudioStream.cxx.
References CLAM_ASSERT.
|
virtual |
Moves the current position to framePosition. If such functionality is not supported by the stream it will be ignored.
Reimplemented from CLAM::AudioCodecs::Stream.
Definition at line 174 of file MpegAudioStream.cxx.
References CLAM::AudioCodecs::MpegBitstream::CurrentFrame(), CLAM::AudioCodecs::MpegBitstream::CurrentFrameFileOffset(), CLAM::AudioCodecs::MpegBitstream::Init(), CLAM::AudioCodecs::Stream::mFramePosition, CLAM::AudioCodecs::MpegBitstream::NextFrame(), and CLAM::AudioCodecs::MpegBitstream::SynthesizeCurrent().