CLAM::AudioCodecs::OggVorbisAudioStream Class Reference

#include <OggVorbisAudioStream.hxx>

List of all members.

Public Member Functions

 OggVorbisAudioStream (const AudioFile &file)
 ~OggVorbisAudioStream ()
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.

Protected Member Functions

void DiskToMemoryTransfer ()
 Move data from the file to mInterleavedData.
void MemoryToDiskTransfer ()
 Move data from mInterleavedData to the file.

Protected Attributes

std::string mName
FILE * mFileHandle
OggVorbis_File mNativeFileParams
int mCurrentSection
bool mValidFileParams
vorbis_info mStreamInfo
vorbis_comment mFileComments
ogg_stream_state mOggStreamState
ogg_page mOggPage
ogg_packet mOggPacket
vorbis_dsp_state mDSPState
vorbis_block mVorbisBlock
int mEncodedSampleRate
bool mEncoding
std::vector< TInt16mBlockBuffer
std::vector< std::deque< TData > > mEncodeBuffer
std::deque< TInt16mDecodeBuffer
TSize mLastBytesRead

Static Protected Attributes

static const unsigned mMaxBlockSize = 4096 / sizeof(TInt16)
static const unsigned mAnalysisWindowSize = 1024

Detailed Description

Definition at line 42 of file OggVorbisAudioStream.hxx.


Constructor & Destructor Documentation

CLAM::AudioCodecs::OggVorbisAudioStream::OggVorbisAudioStream ( const AudioFile file  ) 
CLAM::AudioCodecs::OggVorbisAudioStream::~OggVorbisAudioStream (  ) 

Definition at line 56 of file OggVorbisAudioStream.cxx.

References Dispose().


Member Function Documentation

void CLAM::AudioCodecs::OggVorbisAudioStream::DiskToMemoryTransfer (  )  [protected, virtual]
void CLAM::AudioCodecs::OggVorbisAudioStream::Dispose (  )  [virtual]
void CLAM::AudioCodecs::OggVorbisAudioStream::MemoryToDiskTransfer (  )  [protected, virtual]

Move data from mInterleavedData to the file.

Implements CLAM::AudioCodecs::Stream.

Definition at line 269 of file OggVorbisAudioStream.cxx.

References mAnalysisWindowSize, CLAM::AudioCodecs::Stream::mChannels, mEncodeBuffer, and CLAM::AudioCodecs::Stream::mInterleavedData.

void CLAM::AudioCodecs::OggVorbisAudioStream::PrepareReading (  )  [virtual]
void CLAM::AudioCodecs::OggVorbisAudioStream::PrepareWriting (  )  [virtual]

Open the stream in write mode.

Implements CLAM::AudioCodecs::Stream.

Definition at line 96 of file OggVorbisAudioStream.cxx.

References CLAM_ASSERT, mEncoding, mFileHandle, mName, and NULL.

void CLAM::AudioCodecs::OggVorbisAudioStream::SeekTo ( unsigned long  framePosition  )  [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 348 of file OggVorbisAudioStream.cxx.

References CLAM::AudioCodecs::Stream::mFramePosition, and mNativeFileParams.


Member Data Documentation

Definition at line 87 of file OggVorbisAudioStream.hxx.

Referenced by MemoryToDiskTransfer().

Definition at line 88 of file OggVorbisAudioStream.hxx.

Referenced by DiskToMemoryTransfer(), and OggVorbisAudioStream().

Definition at line 70 of file OggVorbisAudioStream.hxx.

Referenced by DiskToMemoryTransfer(), and PrepareReading().

Definition at line 90 of file OggVorbisAudioStream.hxx.

Referenced by DiskToMemoryTransfer().

Definition at line 80 of file OggVorbisAudioStream.hxx.

Referenced by Dispose().

std::vector<std::deque<TData> > CLAM::AudioCodecs::OggVorbisAudioStream::mEncodeBuffer [protected]

Definition at line 89 of file OggVorbisAudioStream.hxx.

Referenced by Dispose(), MemoryToDiskTransfer(), and OggVorbisAudioStream().

Definition at line 83 of file OggVorbisAudioStream.hxx.

Referenced by OggVorbisAudioStream().

Definition at line 84 of file OggVorbisAudioStream.hxx.

Referenced by Dispose(), and PrepareWriting().

Definition at line 75 of file OggVorbisAudioStream.hxx.

Referenced by Dispose().

Definition at line 68 of file OggVorbisAudioStream.hxx.

Referenced by Dispose(), PrepareReading(), and PrepareWriting().

Definition at line 92 of file OggVorbisAudioStream.hxx.

Referenced by DiskToMemoryTransfer().

const unsigned CLAM::AudioCodecs::OggVorbisAudioStream::mMaxBlockSize = 4096 / sizeof(TInt16) [static, protected]

Definition at line 86 of file OggVorbisAudioStream.hxx.

Referenced by DiskToMemoryTransfer(), and OggVorbisAudioStream().

Definition at line 67 of file OggVorbisAudioStream.hxx.

Referenced by OggVorbisAudioStream(), PrepareReading(), and PrepareWriting().

Definition at line 69 of file OggVorbisAudioStream.hxx.

Referenced by DiskToMemoryTransfer(), Dispose(), PrepareReading(), and SeekTo().

Definition at line 79 of file OggVorbisAudioStream.hxx.

Definition at line 78 of file OggVorbisAudioStream.hxx.

Definition at line 77 of file OggVorbisAudioStream.hxx.

Referenced by Dispose().

Definition at line 74 of file OggVorbisAudioStream.hxx.

Referenced by Dispose().

Definition at line 71 of file OggVorbisAudioStream.hxx.

Definition at line 81 of file OggVorbisAudioStream.hxx.

Referenced by Dispose().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3