Blender V2.61 - r43446
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, bool &eos, 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 39 of file AUD_IReader.h.


Constructor & Destructor Documentation

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

Destroys the reader.

Definition at line 45 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, especially after seeking.

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

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 buffering types.

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

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

Request to read the next length samples out of the source. The buffer supplied has the needed size.

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]eosEnd of stream, whether the end is reached or not.
[in]bufferThe pointer to the buffer to read into.

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

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

Seeks to a specific position in the source.

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.

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


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