CLAM-Development
1.1
|
Streams provide I/O to and from an audio file of a given format. More...
#include <AudioCodecs_Stream.hxx>
Streams provide I/O to and from an audio file of a given format.
You can get a stream by using a Codec. To add support for a different format you must subclass both the Codec and the Stream.
Definition at line 44 of file AudioCodecs_Stream.hxx.
Definition at line 29 of file AudioCodecs_Stream.cxx.
CLAM::AudioCodecs::Stream::~Stream | ( | ) | [virtual] |
Definition at line 34 of file AudioCodecs_Stream.cxx.
void CLAM::AudioCodecs::Stream::ActivateStrictStreaming | ( | ) | [inline] |
Definition at line 113 of file AudioCodecs_Stream.hxx.
References mStrictStreaming.
bool CLAM::AudioCodecs::Stream::AllChannelsConsumed | ( | ) | [protected] |
Definition at line 67 of file AudioCodecs_Stream.cxx.
References mChannelsConsumed.
bool CLAM::AudioCodecs::Stream::AllChannelsProduced | ( | ) | [protected] |
Definition at line 38 of file AudioCodecs_Stream.cxx.
References mChannelsProduced.
Referenced by WriteData().
void CLAM::AudioCodecs::Stream::DeactivateStrictStreaming | ( | ) | [inline] |
Definition at line 118 of file AudioCodecs_Stream.hxx.
References mStrictStreaming.
Referenced by CLAM::MonoAudioFileReader::ConcreteConfigure(), CLAM::MonoAudioFileReader::ConcreteStart(), and CLAM::MonoAudioFileReader::Do().
virtual void CLAM::AudioCodecs::Stream::DiskToMemoryTransfer | ( | ) | [protected, pure virtual] |
virtual void CLAM::AudioCodecs::Stream::Dispose | ( | ) | [pure virtual] |
Implemented in CLAM::AudioCodecs::OggVorbisAudioStream, CLAM::AudioCodecs::PCMAudioStream, and CLAM::AudioCodecs::MpegAudioStream.
Referenced by CLAM::MonoAudioFileWriter::ConcreteStop(), CLAM::MonoAudioFileReader::ConcreteStop(), CLAM::MultiChannelAudioFileWriter::ConcreteStop(), and CLAM::MultiChannelAudioFileReader::ConcreteStop().
void CLAM::AudioCodecs::Stream::MarkAllChannelsAsConsumed | ( | ) | [protected] |
Definition at line 78 of file AudioCodecs_Stream.cxx.
References mChannelsConsumed.
Referenced by CLAM::AudioCodecs::MpegAudioStream::PrepareReading(), CLAM::AudioCodecs::PCMAudioStream::PrepareReading(), CLAM::AudioCodecs::OggVorbisAudioStream::PrepareReading(), and CLAM::AudioCodecs::PCMAudioStream::PrepareReadWrite().
void CLAM::AudioCodecs::Stream::MarkAllChannelsAsProduced | ( | ) | [protected] |
Definition at line 49 of file AudioCodecs_Stream.cxx.
References mChannelsProduced.
Referenced by CLAM::AudioCodecs::PCMAudioStream::PrepareReadWrite(), CLAM::AudioCodecs::PCMAudioStream::PrepareWriting(), and CLAM::AudioCodecs::OggVorbisAudioStream::PrepareWriting().
virtual void CLAM::AudioCodecs::Stream::MemoryToDiskTransfer | ( | ) | [protected, pure virtual] |
Implemented in CLAM::AudioCodecs::OggVorbisAudioStream, CLAM::AudioCodecs::PCMAudioStream, and CLAM::AudioCodecs::MpegAudioStream.
Referenced by WriteData().
virtual void CLAM::AudioCodecs::Stream::PrepareReading | ( | ) | [pure virtual] |
virtual void CLAM::AudioCodecs::Stream::PrepareReadWrite | ( | ) | [pure virtual] |
virtual void CLAM::AudioCodecs::Stream::PrepareWriting | ( | ) | [pure virtual] |
bool CLAM::AudioCodecs::Stream::ReadData | ( | int | channel, |
TData * | ptr, | ||
TSize | howmany | ||
) |
Definition at line 124 of file AudioCodecs_Stream.cxx.
References CLAM::Array< T >::GetPtr(), mChannels, mChannelsConsumed, mEOFReached, mFramesLastRead, mInterleavedData, and CLAM::Array< T >::Size().
Referenced by CLAM::MonoAudioFileReader::Do(), and CLAM::MultiChannelAudioFileReader::Do().
bool CLAM::AudioCodecs::Stream::ReadData | ( | int * | channels, |
int | nchannels, | ||
TData ** | samples, | ||
TSize | howmany | ||
) |
Definition at line 150 of file AudioCodecs_Stream.cxx.
References CLAM::Array< T >::GetPtr(), mChannels, mChannelsConsumed, mEOFReached, mFramesLastRead, mInterleavedData, and CLAM::Array< T >::Size().
void CLAM::AudioCodecs::Stream::ResetConsumedChannels | ( | ) | [protected] |
Definition at line 86 of file AudioCodecs_Stream.cxx.
References mChannelsConsumed.
void CLAM::AudioCodecs::Stream::ResetProducedChannels | ( | ) | [protected] |
Definition at line 59 of file AudioCodecs_Stream.cxx.
References mChannelsProduced.
void CLAM::AudioCodecs::Stream::SetChannels | ( | TSize | nChannels | ) | [protected] |
Definition at line 265 of file AudioCodecs_Stream.cxx.
References mChannels, mChannelsConsumed, and mChannelsProduced.
Referenced by CLAM::AudioCodecs::MpegAudioStream::PrepareReading(), CLAM::AudioCodecs::OggVorbisAudioStream::PrepareReading(), CLAM::AudioCodecs::PCMAudioStream::SetFOI(), and CLAM::AudioCodecs::OggVorbisAudioStream::VorbisI_EncoderSetup().
virtual void CLAM::AudioCodecs::Stream::SetFOI | ( | const AudioFile & | ) | [pure virtual] |
bool CLAM::AudioCodecs::Stream::StrictStreaming | ( | ) | const [inline] |
Definition at line 123 of file AudioCodecs_Stream.hxx.
References mStrictStreaming.
bool CLAM::AudioCodecs::Stream::WasSomethingRead | ( | ) | const [inline] |
Definition at line 107 of file AudioCodecs_Stream.hxx.
References mFramesLastRead.
void CLAM::AudioCodecs::Stream::WriteData | ( | int | channel, |
const TData * | ptr, | ||
TSize | howmany | ||
) |
Definition at line 204 of file AudioCodecs_Stream.cxx.
References AllChannelsProduced(), CLAM::Array< T >::GetPtr(), mChannels, mChannelsProduced, MemoryToDiskTransfer(), mInterleavedDataOut, and CLAM::Array< T >::Size().
Referenced by CLAM::MonoAudioFileWriter::Do(), and CLAM::MultiChannelAudioFileWriter::Do().
void CLAM::AudioCodecs::Stream::WriteData | ( | int * | channels, |
int | nchannels, | ||
TData **const | samples, | ||
TSize | howmany | ||
) |
Definition at line 226 of file AudioCodecs_Stream.cxx.
References AllChannelsProduced(), CLAM::Array< T >::GetPtr(), mChannels, mChannelsProduced, MemoryToDiskTransfer(), mInterleavedDataOut, and CLAM::Array< T >::Size().
TSize CLAM::AudioCodecs::Stream::mChannels [protected] |
Definition at line 87 of file AudioCodecs_Stream.hxx.
Referenced by ReadData(), SetChannels(), and WriteData().
std::vector<bool> CLAM::AudioCodecs::Stream::mChannelsConsumed [protected] |
Definition at line 88 of file AudioCodecs_Stream.hxx.
Referenced by AllChannelsConsumed(), MarkAllChannelsAsConsumed(), ReadData(), ResetConsumedChannels(), and SetChannels().
std::vector<bool> CLAM::AudioCodecs::Stream::mChannelsProduced [protected] |
Definition at line 89 of file AudioCodecs_Stream.hxx.
Referenced by AllChannelsProduced(), MarkAllChannelsAsProduced(), ResetProducedChannels(), SetChannels(), and WriteData().
bool CLAM::AudioCodecs::Stream::mEOFReached [protected] |
Definition at line 93 of file AudioCodecs_Stream.hxx.
Referenced by CLAM::AudioCodecs::MpegAudioStream::DiskToMemoryTransfer(), CLAM::AudioCodecs::PCMAudioStream::DiskToMemoryTransfer(), CLAM::AudioCodecs::OggVorbisAudioStream::DiskToMemoryTransfer(), CLAM::AudioCodecs::PCMAudioStream::PrepareReading(), CLAM::AudioCodecs::PCMAudioStream::PrepareReadWrite(), and ReadData().
TSize CLAM::AudioCodecs::Stream::mFramesLastRead [protected] |
TSize CLAM::AudioCodecs::Stream::mFramesToRead [protected] |
Definition at line 94 of file AudioCodecs_Stream.hxx.
Referenced by CLAM::AudioCodecs::PCMAudioStream::DiskToMemoryTransfer().
TSize CLAM::AudioCodecs::Stream::mFramesToWrite [protected] |
Definition at line 95 of file AudioCodecs_Stream.hxx.
Referenced by CLAM::AudioCodecs::PCMAudioStream::MemoryToDiskTransfer().
DataArray CLAM::AudioCodecs::Stream::mInterleavedData [protected] |
Definition at line 91 of file AudioCodecs_Stream.hxx.
Referenced by CLAM::AudioCodecs::MpegAudioStream::ConsumeDecodedSamples(), CLAM::AudioCodecs::OggVorbisAudioStream::ConsumeDecodedSamples(), CLAM::AudioCodecs::MpegAudioStream::DiskToMemoryTransfer(), CLAM::AudioCodecs::PCMAudioStream::DiskToMemoryTransfer(), CLAM::AudioCodecs::OggVorbisAudioStream::DiskToMemoryTransfer(), and ReadData().
Definition at line 92 of file AudioCodecs_Stream.hxx.
Referenced by CLAM::AudioCodecs::PCMAudioStream::MemoryToDiskTransfer(), CLAM::AudioCodecs::OggVorbisAudioStream::MemoryToDiskTransfer(), and WriteData().
bool CLAM::AudioCodecs::Stream::mStrictStreaming [protected] |
Definition at line 90 of file AudioCodecs_Stream.hxx.
Referenced by ActivateStrictStreaming(), DeactivateStrictStreaming(), and StrictStreaming().