Blender  V2.59
Public Member Functions
AUD_IReader Class Reference

#include <AUD_IReader.h>

Inheritance diagram for AUD_IReader:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~AUD_IReader ()
virtual bool isSeekable () const =0
virtual void seek (int position)=0
virtual int getLength () const =0
virtual int getPosition () const =0
virtual AUD_Specs getSpecs () const =0
virtual void read (int &length, sample_t *&buffer)=0

Detailed Description

This class represents a sound source as stream or as buffer which can be read for example by another reader, a device or whatever.

Definition at line 41 of file AUD_IReader.h.


Constructor & Destructor Documentation

virtual AUD_IReader::~AUD_IReader ( ) [inline, virtual]

Destroys the reader.

Definition at line 47 of file AUD_IReader.h.


Member Function Documentation

virtual int AUD_IReader::getLength ( ) const [pure virtual]
virtual int AUD_IReader::getPosition ( ) const [pure virtual]

Returns the position of the source as a sample count value.

Returns:
The current position in the source. A negative value indicates that the position is unknown.
Warning:
The value returned doesn't always have to be correct for readers of the stream type, especially after seeking, it must though for the buffer ones.
See also:
getType

Implemented in AUD_SndFileReader, AUD_SRCResampleReader, AUD_SequencerReader, AUD_LinearResampleReader, AUD_DoubleReader, AUD_SinusReader, AUD_SuperposeReader, AUD_DelayReader, AUD_BufferReader, AUD_LoopReader, AUD_ReverseReader, AUD_SilenceReader, AUD_EffectReader, and AUD_LimiterReader.

Referenced by AUD_EffectReader::getPosition(), AUD_LimiterReader::getPosition(), AUD_LoopReader::getPosition(), AUD_DelayReader::getPosition(), AUD_SuperposeReader::getPosition(), AUD_DoubleReader::getPosition(), AUD_SoftwareDevice::getPosition(), AUD_OpenALDevice::getPosition(), AUD_LimiterReader::read(), AUD_FaderReader::read(), AUD_SequencerReader::read(), and AUD_DoubleReader::seek().

virtual AUD_Specs AUD_IReader::getSpecs ( ) const [pure virtual]
virtual bool AUD_IReader::isSeekable ( ) const [pure virtual]

Tells whether the source provides seeking functionality or not.

Warning:
This doesn't mean that the seeking always has to succeed.
Returns:
Always returns true for readers of the buffer type.
See also:
getType

Implemented in AUD_SndFileReader, AUD_SequencerReader, AUD_DoubleReader, AUD_SinusReader, AUD_SuperposeReader, AUD_BufferReader, AUD_SilenceReader, and AUD_EffectReader.

Referenced by AUD_LimiterReader::AUD_LimiterReader(), AUD_EffectReader::isSeekable(), AUD_SuperposeReader::isSeekable(), and AUD_DoubleReader::isSeekable().

virtual void AUD_IReader::read ( int &  length,
sample_t *&  buffer 
) [pure virtual]

Request to read the next length samples out of the source. The buffer for reading has to stay valid until the next call of this method or until the reader is deleted.

Parameters:
[in,out]lengthThe 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]bufferThe pointer to the buffer with the samples.

Implemented in AUD_SndFileReader, AUD_BaseIIRFilterReader, AUD_SRCResampleReader, AUD_SequencerReader, AUD_BandPassReader, AUD_LinearResampleReader, AUD_DoubleReader, AUD_SinusReader, AUD_FaderReader, AUD_ChannelMapperReader, AUD_SuperposeReader, AUD_DelayReader, AUD_BufferReader, AUD_LoopReader, AUD_ReverseReader, AUD_SilenceReader, AUD_ConverterReader, AUD_EffectReader, and AUD_LimiterReader.

Referenced by AUD_LimiterReader::AUD_LimiterReader(), AUD_readSound(), AUD_readSoundBuffer(), AUD_StreamBufferFactory::AUD_StreamBufferFactory(), AUD_SRCResampleReader::doCallback(), AUD_SoftwareDevice::mix(), AUD_OpenALDevice::play(), AUD_LimiterReader::read(), AUD_EffectReader::read(), AUD_ConverterReader::read(), AUD_ReverseReader::read(), AUD_LoopReader::read(), AUD_DelayReader::read(), AUD_SuperposeReader::read(), AUD_ChannelMapperReader::read(), AUD_FaderReader::read(), AUD_DoubleReader::read(), AUD_LinearResampleReader::read(), AUD_BandPassReader::read(), AUD_SequencerReader::read(), AUD_BaseIIRFilterReader::read(), AUD_OpenALDevice::seek(), and AUD_OpenALDevice::updateStreams().

virtual void AUD_IReader::seek ( int  position) [pure virtual]

Seeks to a specific position in the source. This function must work for buffer type readers.

Parameters:
positionThe 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.
Warning:
This may work or not, depending on the actual reader.
See also:
getType

Implemented in AUD_SndFileReader, AUD_SRCResampleReader, AUD_SequencerReader, AUD_LinearResampleReader, AUD_DoubleReader, AUD_SinusReader, AUD_SuperposeReader, AUD_DelayReader, AUD_BufferReader, AUD_LoopReader, AUD_ReverseReader, AUD_SilenceReader, AUD_EffectReader, and AUD_LimiterReader.

Referenced by AUD_LimiterReader::AUD_LimiterReader(), AUD_SoftwareDevice::mix(), AUD_ReverseReader::read(), AUD_LoopReader::read(), AUD_SequencerReader::read(), AUD_LimiterReader::seek(), AUD_EffectReader::seek(), AUD_LoopReader::seek(), AUD_DelayReader::seek(), AUD_SuperposeReader::seek(), AUD_DoubleReader::seek(), AUD_LinearResampleReader::seek(), AUD_SRCResampleReader::seek(), AUD_SoftwareDevice::seek(), AUD_OpenALDevice::seek(), and AUD_OpenALDevice::updateStreams().


The documentation for this class was generated from the following file: