#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. |
|
|
|
Returns the current position within the sample source.
|
|
|
|
Returns number of metadata tags present in this sample source.
|
|
Returns the key of the i'th tag in the source. If the tag is "author=me", the key is "author". |
|
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". |
|
Returns the value of the i'th tag in the source. If the tag is "author=me", the value is "me". |
|
|
|
Read frame_count samples into buffer. buffer must be at least |frame_count * GetSampleSize(format) * channel_count| bytes long.
|
|
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. |
|
Sets the current position within the sample source. If the stream is not seekable, this method does nothing.
|
|
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.
|