CLAM::AudioCodecs::Stream Class Reference

#include <AudioCodecs_Stream.hxx>

Inheritance diagram for CLAM::AudioCodecs::Stream:

CLAM::AudioCodecs::MpegAudioStream CLAM::AudioCodecs::OggVorbisAudioStream CLAM::AudioCodecs::PCMAudioStream

List of all members.


Detailed Description

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.

Todo:
Document Stream methods

Definition at line 44 of file AudioCodecs_Stream.hxx.


Public Member Functions

 Stream ()
virtual ~Stream ()
virtual void SetFOI (const AudioFile &)=0
virtual void PrepareReading ()=0
virtual void PrepareWriting ()=0
virtual void PrepareReadWrite ()=0
virtual void Dispose ()=0
void DeactivateStrictStreaming ()
void ActivateStrictStreaming ()
bool StrictStreaming () const
bool ReadData (int channel, TData *ptr, TSize howmany)
bool ReadData (int *channels, int nchannels, TData **samples, TSize howmany)
void WriteData (int channel, const TData *ptr, TSize howmany)
void WriteData (int *channels, int nchannels, TData **const samples, TSize howmany)
bool WasSomethingRead () const

Protected Member Functions

virtual void DiskToMemoryTransfer ()=0
virtual void MemoryToDiskTransfer ()=0
bool AllChannelsConsumed ()
void ResetConsumedChannels ()
void MarkAllChannelsAsConsumed ()
bool AllChannelsProduced ()
void ResetProducedChannels ()
void MarkAllChannelsAsProduced ()
void SetChannels (TSize nChannels)

Protected Attributes

TSize mChannels
std::vector< boolmChannelsConsumed
std::vector< boolmChannelsProduced
bool mStrictStreaming
DataArray mInterleavedData
DataArray mInterleavedDataOut
bool mEOFReached
TSize mFramesToRead
TSize mFramesToWrite
TSize mFramesLastRead

Constructor & Destructor Documentation

CLAM::AudioCodecs::Stream::Stream (  ) 

Definition at line 29 of file AudioCodecs_Stream.cxx.

CLAM::AudioCodecs::Stream::~Stream (  )  [virtual]

Definition at line 34 of file AudioCodecs_Stream.cxx.


Member Function Documentation

virtual void CLAM::AudioCodecs::Stream::SetFOI ( const AudioFile  )  [pure virtual]

virtual void CLAM::AudioCodecs::Stream::PrepareReading (  )  [pure virtual]

virtual void CLAM::AudioCodecs::Stream::PrepareWriting (  )  [pure virtual]

virtual void CLAM::AudioCodecs::Stream::PrepareReadWrite (  )  [pure virtual]

virtual void CLAM::AudioCodecs::Stream::Dispose (  )  [pure virtual]

void CLAM::AudioCodecs::Stream::DeactivateStrictStreaming (  )  [inline]

void CLAM::AudioCodecs::Stream::ActivateStrictStreaming (  )  [inline]

Definition at line 113 of file AudioCodecs_Stream.hxx.

References mStrictStreaming.

bool CLAM::AudioCodecs::Stream::StrictStreaming (  )  const [inline]

Definition at line 123 of file AudioCodecs_Stream.hxx.

References mStrictStreaming.

bool CLAM::AudioCodecs::Stream::ReadData ( int  channel,
TData ptr,
TSize  howmany 
)

bool CLAM::AudioCodecs::Stream::ReadData ( int channels,
int  nchannels,
TData **  samples,
TSize  howmany 
)

void CLAM::AudioCodecs::Stream::WriteData ( int  channel,
const TData ptr,
TSize  howmany 
)

void CLAM::AudioCodecs::Stream::WriteData ( int channels,
int  nchannels,
TData **const   samples,
TSize  howmany 
)

bool CLAM::AudioCodecs::Stream::WasSomethingRead (  )  const [inline]

Definition at line 107 of file AudioCodecs_Stream.hxx.

References mFramesLastRead.

virtual void CLAM::AudioCodecs::Stream::DiskToMemoryTransfer (  )  [protected, pure virtual]

virtual void CLAM::AudioCodecs::Stream::MemoryToDiskTransfer (  )  [protected, pure virtual]

bool CLAM::AudioCodecs::Stream::AllChannelsConsumed (  )  [protected]

Definition at line 67 of file AudioCodecs_Stream.cxx.

References mChannelsConsumed.

void CLAM::AudioCodecs::Stream::ResetConsumedChannels (  )  [protected]

Definition at line 86 of file AudioCodecs_Stream.cxx.

References mChannelsConsumed.

void CLAM::AudioCodecs::Stream::MarkAllChannelsAsConsumed (  )  [protected]

bool CLAM::AudioCodecs::Stream::AllChannelsProduced (  )  [protected]

Definition at line 38 of file AudioCodecs_Stream.cxx.

References mChannelsProduced.

Referenced by WriteData().

void CLAM::AudioCodecs::Stream::ResetProducedChannels (  )  [protected]

Definition at line 59 of file AudioCodecs_Stream.cxx.

References mChannelsProduced.

void CLAM::AudioCodecs::Stream::MarkAllChannelsAsProduced (  )  [protected]

void CLAM::AudioCodecs::Stream::SetChannels ( TSize  nChannels  )  [protected]


Member Data Documentation

Definition at line 87 of file AudioCodecs_Stream.hxx.

Referenced by ReadData(), SetChannels(), and WriteData().


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

Generated on Tue Aug 12 22:33:51 2008 for CLAM by  doxygen 1.5.5