Audaspace 1.5.0
A high level audio library.
|
This class represents a sound source as stream or as buffer which can be read for example by another reader, a device or whatever. More...
#include <IReader.h>
Public Member Functions | |
virtual | ~IReader () |
Destroys the reader. | |
virtual bool | isSeekable () const =0 |
Tells whether the source provides seeking functionality or not. | |
virtual void | seek (int position)=0 |
Seeks to a specific position in the source. | |
virtual int | getLength () const =0 |
Returns an approximated length of the source in samples. | |
virtual int | getPosition () const =0 |
Returns the position of the source as a sample count value. | |
virtual Specs | getSpecs () const =0 |
Returns the specification of the reader. | |
virtual void | read (int &length, bool &eos, sample_t *buffer)=0 |
Request to read the next length samples out of the source. | |
This class represents a sound source as stream or as buffer which can be read for example by another reader, a device or whatever.
|
pure virtual |
Returns an approximated length of the source in samples.
Implemented in BinauralReader, ConvolverReader, DelayReader, EffectReader, LimiterReader, LoopReader, ModulatorReader, MutableReader, ReverseReader, VolumeReader, SawtoothReader, SilenceReader, SineReader, SquareReader, TriangleReader, JOSResampleReader, LinearResampleReader, DoubleReader, SequenceReader, SuperposeReader, BufferReader, FFMPEGReader, SndFileReader, and OpenALReader.
|
pure virtual |
Returns the position of the source as a sample count value.
Implemented in BinauralReader, ConvolverReader, DelayReader, EffectReader, LimiterReader, LoopReader, ModulatorReader, MutableReader, ReverseReader, VolumeReader, SawtoothReader, SilenceReader, SineReader, SquareReader, TriangleReader, JOSResampleReader, LinearResampleReader, DoubleReader, SequenceReader, SuperposeReader, BufferReader, FFMPEGReader, SndFileReader, and OpenALReader.
|
pure virtual |
Returns the specification of the reader.
Implemented in BinauralReader, ConvolverReader, EffectReader, ModulatorReader, MutableReader, PitchReader, VolumeReader, SawtoothReader, SilenceReader, SineReader, SquareReader, TriangleReader, ChannelMapperReader, JOSResampleReader, LinearResampleReader, DoubleReader, SequenceReader, SuperposeReader, BufferReader, FFMPEGReader, SndFileReader, and OpenALReader.
|
pure virtual |
Tells whether the source provides seeking functionality or not.
Implemented in BinauralReader, ConvolverReader, EffectReader, ModulatorReader, MutableReader, VolumeReader, SawtoothReader, SilenceReader, SineReader, SquareReader, TriangleReader, DoubleReader, SequenceReader, SuperposeReader, BufferReader, FFMPEGReader, SndFileReader, and OpenALReader.
|
pure virtual |
Request to read the next length samples out of the source.
The buffer supplied has the needed size.
[in,out] | length | The count of samples that should be read. Shall contain the real count of samples after reading, in case there were only fewer samples available. A smaller value also indicates the end of the reader. |
[out] | eos | End of stream, whether the end is reached or not. |
[in] | buffer | The pointer to the buffer to read into. |
Implemented in ADSRReader, BaseIIRFilterReader, BinauralReader, ConvolverReader, DelayReader, EffectReader, FaderReader, LimiterReader, LoopReader, ModulatorReader, MutableReader, ReverseReader, VolumeReader, SawtoothReader, SilenceReader, SineReader, SquareReader, TriangleReader, ChannelMapperReader, ConverterReader, JOSResampleReader, LinearResampleReader, DoubleReader, SequenceReader, SuperposeReader, BufferReader, FFMPEGReader, SndFileReader, and OpenALReader.
|
pure virtual |
Seeks to a specific position in the source.
position | The position to seek for measured in samples. To get from a given time to the samples you simply have to multiply the time value in seconds with the sample rate of the reader. |
Implemented in BinauralReader, ConvolverReader, DelayReader, EffectReader, LimiterReader, LoopReader, ModulatorReader, MutableReader, ReverseReader, VolumeReader, SawtoothReader, SilenceReader, SineReader, SquareReader, TriangleReader, JOSResampleReader, LinearResampleReader, DoubleReader, SequenceReader, SuperposeReader, BufferReader, FFMPEGReader, SndFileReader, and OpenALReader.