|
CLAM-Development
1.4.0
|
#include <PCMAudioStream.hxx>
Public Member Functions | |
| PCMAudioStream (const AudioFile &file) | |
| ~PCMAudioStream () | |
| void | PrepareReading () |
| Open the stream in read mode. | |
| void | PrepareWriting () |
| Open the stream in write mode. | |
| void | Dispose () |
| Close the stream. | |
| void | SeekTo (long unsigned framePosition) |
Public Member Functions inherited from CLAM::AudioCodecs::Stream | |
| Stream () | |
| virtual | ~Stream () |
| virtual void | SeekTo (unsigned long framePosition) |
| Moves the current position to framePosition. If such functionality is not supported by the stream it will be ignored. | |
| 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) |
Additional Inherited Members | |
Protected Attributes inherited from CLAM::AudioCodecs::Stream | |
| unsigned | mChannels |
| std::vector< TData > | mInterleavedData |
| bool | mEOFReached |
| unsigned | mFramesLastRead |
| unsigned long | mFramePosition |
Definition at line 39 of file PCMAudioStream.hxx.
| CLAM::AudioCodecs::PCMAudioStream::PCMAudioStream | ( | const AudioFile & | file | ) |
Definition at line 39 of file PCMAudioStream.cxx.
References CLAM::AudioFile::GetHeader(), CLAM::AudioFile::GetLocation(), and CLAM::AudioCodecs::Stream::SetChannels().
| CLAM::AudioCodecs::PCMAudioStream::~PCMAudioStream | ( | ) |
Definition at line 49 of file PCMAudioStream.cxx.
References Dispose().
|
protectedvirtual |
Move data from the file to mInterleavedData.
Implements CLAM::AudioCodecs::Stream.
Definition at line 85 of file PCMAudioStream.cxx.
References CLAM_sf_readf, CLAM::AudioCodecs::Stream::mEOFReached, CLAM::AudioCodecs::Stream::mFramePosition, CLAM::AudioCodecs::Stream::mFramesLastRead, and CLAM::AudioCodecs::Stream::mInterleavedData.
|
virtual |
Close the stream.
Implements CLAM::AudioCodecs::Stream.
Definition at line 76 of file PCMAudioStream.cxx.
References NULL.
Referenced by ~PCMAudioStream().
|
protectedvirtual |
Move data from mInterleavedData to the file.
Implements CLAM::AudioCodecs::Stream.
Definition at line 110 of file PCMAudioStream.cxx.
References CLAM_DEBUG_ASSERT, CLAM_sf_writef, CLAM::AudioCodecs::Stream::mChannels, and CLAM::AudioCodecs::Stream::mInterleavedData.
|
virtual |
Open the stream in read mode.
Implements CLAM::AudioCodecs::Stream.
Definition at line 54 of file PCMAudioStream.cxx.
References CLAM_ASSERT, CLAM::AudioCodecs::Stream::mEOFReached, CLAM::AudioCodecs::Stream::mFramePosition, and NULL.
|
virtual |
Open the stream in write mode.
Implements CLAM::AudioCodecs::Stream.
Definition at line 66 of file PCMAudioStream.cxx.
References CLAM_ASSERT, and NULL.
| void CLAM::AudioCodecs::PCMAudioStream::SeekTo | ( | long unsigned | framePosition | ) |
Definition at line 122 of file PCMAudioStream.cxx.
References CLAM::AudioCodecs::Stream::mEOFReached, and CLAM::AudioCodecs::Stream::mFramePosition.
1.8.1