#include <audiere.h>
Inheritance diagram for audiere::SampleSource:
Public Member Functions | |
virtual void | getFormat (int &channel_count, int &sample_rate, SampleFormat &sample_format)=0 |
virtual int | read (int frame_count, void *buffer)=0 |
virtual void | reset ()=0 |
virtual bool | isSeekable ()=0 |
virtual int | getLength ()=0 |
virtual void | setPosition (int position)=0 |
virtual int | getPosition ()=0 |
virtual bool | getRepeat ()=0 |
virtual void | setRepeat (bool repeat)=0 |
virtual int | getTagCount ()=0 |
virtual const char * | getTagKey (int i)=0 |
virtual const char * | getTagValue (int i)=0 |
virtual const char * | getTagType (int i)=0 |
Protected Member Functions | |
~SampleSource () |
This interface is not synchronized.
Definition at line 306 of file audiere.h.
|
|
|
Retrieve the number of channels, sample rate, and sample format of the sample source. Implemented in audiere::AIFFInputStream, audiere::FLACInputStream, audiere::MODInputStream, audiere::MP3InputStream, audiere::OGGInputStream, audiere::SpeexInputStream, audiere::WAVInputStream, audiere::LoopPointSourceImpl, audiere::WhiteNoise, audiere::PinkNoise, audiere::Resampler, audiere::BufferStream, audiere::SquareWave, and audiere::SineWave. Referenced by audiere::GetFrameSize(), and audiere::DSAudioDevice::openStream(). |
|
Implemented in audiere::BasicSource, audiere::AIFFInputStream, audiere::FLACInputStream, audiere::MP3InputStream, audiere::OGGInputStream, audiere::SpeexInputStream, audiere::WAVInputStream, audiere::LoopPointSourceImpl, audiere::Resampler, and audiere::BufferStream. |
|
Returns the current position within the sample source.
Implemented in audiere::BasicSource, audiere::AIFFInputStream, audiere::FLACInputStream, audiere::MP3InputStream, audiere::OGGInputStream, audiere::SpeexInputStream, audiere::WAVInputStream, audiere::LoopPointSourceImpl, audiere::Resampler, and audiere::BufferStream. |
|
Implemented in audiere::BasicSource, audiere::LoopPointSourceImpl, and audiere::Resampler. |
|
Returns number of metadata tags present in this sample source.
Implemented in audiere::BasicSource, audiere::LoopPointSourceImpl, and audiere::Resampler. |
|
Returns the key of the i'th tag in the source. If the tag is "author=me", the key is "author". Implemented in audiere::BasicSource, audiere::LoopPointSourceImpl, and audiere::Resampler. |
|
Returns the type of the i'th tag in the source. The type is where the tag comes from, i.e. "ID3v1", "ID3v2", or "vorbis". Implemented in audiere::BasicSource, audiere::LoopPointSourceImpl, and audiere::Resampler. |
|
Returns the value of the i'th tag in the source. If the tag is "author=me", the value is "me". Implemented in audiere::BasicSource, audiere::LoopPointSourceImpl, and audiere::Resampler. |
|
Implemented in audiere::BasicSource, audiere::AIFFInputStream, audiere::FLACInputStream, audiere::MP3InputStream, audiere::OGGInputStream, audiere::SpeexInputStream, audiere::WAVInputStream, audiere::LoopPointSourceImpl, audiere::Resampler, and audiere::BufferStream. |
|
Read frame_count samples into buffer. buffer must be at least |frame_count * GetSampleSize(format) * channel_count| bytes long.
Implemented in audiere::BasicSource, audiere::LoopPointSourceImpl, and audiere::Resampler. |
|
Reset the sample source. This has the same effect as setPosition(0) on a seekable source. On an unseekable source, it resets all internal state to the way it was when the source was first created. Implemented in audiere::AIFFInputStream, audiere::FLACInputStream, audiere::MODInputStream, audiere::MP3InputStream, audiere::OGGInputStream, audiere::SpeexInputStream, audiere::WAVInputStream, audiere::LoopPointSourceImpl, audiere::WhiteNoise, audiere::PinkNoise, audiere::Resampler, audiere::BufferStream, audiere::SquareWave, and audiere::SineWave. Referenced by audiere::LoopPointSourceImpl::LoopPointSourceImpl(), and audiere::BasicSource::read(). |
|
Sets the current position within the sample source. If the stream is not seekable, this method does nothing.
Implemented in audiere::BasicSource, audiere::AIFFInputStream, audiere::FLACInputStream, audiere::MP3InputStream, audiere::OGGInputStream, audiere::SpeexInputStream, audiere::WAVInputStream, audiere::LoopPointSourceImpl, audiere::Resampler, and audiere::BufferStream. |
|
Sets whether the sample source should repeat or not. Note that not all sample sources repeat by starting again at the beginning of the sound. For example MOD files can contain embedded loop points.
Implemented in audiere::BasicSource, audiere::LoopPointSourceImpl, and audiere::Resampler. |