|
CLAM-Development
1.4.0
|
#include <OggVorbisAudioStream.hxx>
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. | |
Public Member Functions inherited from CLAM::AudioCodecs::Stream | |
| 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. | |
Protected Member Functions inherited from CLAM::AudioCodecs::Stream | |
| void | SetChannels (unsigned nChannels) |
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< TInt16 > | mBlockBuffer |
| std::vector< std::deque< TData > > | mEncodeBuffer |
| std::deque< TInt16 > | mDecodeBuffer |
| TSize | mLastBytesRead |
Protected Attributes inherited from CLAM::AudioCodecs::Stream | |
| unsigned | mChannels |
| std::vector< TData > | mInterleavedData |
| bool | mEOFReached |
| unsigned | mFramesLastRead |
| unsigned long | mFramePosition |
Static Protected Attributes | |
| static const unsigned | mMaxBlockSize = 4096 / sizeof(TInt16) |
| static const unsigned | mAnalysisWindowSize = 1024 |
Definition at line 42 of file OggVorbisAudioStream.hxx.
| CLAM::AudioCodecs::OggVorbisAudioStream::OggVorbisAudioStream | ( | const AudioFile & | file | ) |
Definition at line 45 of file OggVorbisAudioStream.cxx.
References CLAM::AudioFile::GetHeader(), CLAM::AudioFile::GetLocation(), mBlockBuffer, CLAM::AudioCodecs::Stream::mChannels, mEncodeBuffer, mEncodedSampleRate, mMaxBlockSize, and mName.
| CLAM::AudioCodecs::OggVorbisAudioStream::~OggVorbisAudioStream | ( | ) |
Definition at line 56 of file OggVorbisAudioStream.cxx.
References Dispose().
|
protectedvirtual |
Move data from the file to mInterleavedData.
Implements CLAM::AudioCodecs::Stream.
Definition at line 227 of file OggVorbisAudioStream.cxx.
References CLAM_ASSERT, HOST_ENDIANESS, mBlockBuffer, CLAM::AudioCodecs::Stream::mChannels, mCurrentSection, mDecodeBuffer, CLAM::AudioCodecs::Stream::mEOFReached, CLAM::AudioCodecs::Stream::mFramesLastRead, CLAM::AudioCodecs::Stream::mInterleavedData, mLastBytesRead, mMaxBlockSize, and mNativeFileParams.
|
virtual |
Close the stream.
Implements CLAM::AudioCodecs::Stream.
Definition at line 169 of file OggVorbisAudioStream.cxx.
References mDSPState, mEncodeBuffer, mEncoding, mFileComments, mFileHandle, mNativeFileParams, mOggStreamState, mStreamInfo, mVorbisBlock, and NULL.
Referenced by ~OggVorbisAudioStream().
|
protectedvirtual |
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.
|
virtual |
Open the stream in read mode.
Implements CLAM::AudioCodecs::Stream.
Definition at line 61 of file OggVorbisAudioStream.cxx.
References CLAM_ASSERT, CLAM::AudioCodecs::Stream::mChannels, mCurrentSection, mFileHandle, CLAM::AudioCodecs::Stream::mFramePosition, mName, mNativeFileParams, and NULL.
|
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.
|
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.
|
staticprotected |
Definition at line 87 of file OggVorbisAudioStream.hxx.
Referenced by MemoryToDiskTransfer().
|
protected |
Definition at line 88 of file OggVorbisAudioStream.hxx.
Referenced by DiskToMemoryTransfer(), and OggVorbisAudioStream().
|
protected |
Definition at line 70 of file OggVorbisAudioStream.hxx.
Referenced by DiskToMemoryTransfer(), and PrepareReading().
|
protected |
Definition at line 90 of file OggVorbisAudioStream.hxx.
Referenced by DiskToMemoryTransfer().
|
protected |
Definition at line 80 of file OggVorbisAudioStream.hxx.
Referenced by Dispose().
|
protected |
Definition at line 89 of file OggVorbisAudioStream.hxx.
Referenced by Dispose(), MemoryToDiskTransfer(), and OggVorbisAudioStream().
|
protected |
Definition at line 83 of file OggVorbisAudioStream.hxx.
Referenced by OggVorbisAudioStream().
|
protected |
Definition at line 84 of file OggVorbisAudioStream.hxx.
Referenced by Dispose(), and PrepareWriting().
|
protected |
Definition at line 75 of file OggVorbisAudioStream.hxx.
Referenced by Dispose().
|
protected |
Definition at line 68 of file OggVorbisAudioStream.hxx.
Referenced by Dispose(), PrepareReading(), and PrepareWriting().
|
protected |
Definition at line 92 of file OggVorbisAudioStream.hxx.
Referenced by DiskToMemoryTransfer().
|
staticprotected |
Definition at line 86 of file OggVorbisAudioStream.hxx.
Referenced by DiskToMemoryTransfer(), and OggVorbisAudioStream().
|
protected |
Definition at line 67 of file OggVorbisAudioStream.hxx.
Referenced by OggVorbisAudioStream(), PrepareReading(), and PrepareWriting().
|
protected |
Definition at line 69 of file OggVorbisAudioStream.hxx.
Referenced by DiskToMemoryTransfer(), Dispose(), PrepareReading(), and SeekTo().
|
protected |
Definition at line 79 of file OggVorbisAudioStream.hxx.
|
protected |
Definition at line 78 of file OggVorbisAudioStream.hxx.
|
protected |
Definition at line 77 of file OggVorbisAudioStream.hxx.
Referenced by Dispose().
|
protected |
Definition at line 74 of file OggVorbisAudioStream.hxx.
Referenced by Dispose().
|
protected |
Definition at line 71 of file OggVorbisAudioStream.hxx.
|
protected |
Definition at line 81 of file OggVorbisAudioStream.hxx.
Referenced by Dispose().
1.8.1