AudioFormatReaderSource Class Reference

A type of AudioSource that will read from an AudioFormatReader. More...

Inherits PositionableAudioSource.

List of all members.

Public Member Functions

 AudioFormatReaderSource (AudioFormatReader *const sourceReader, const bool deleteReaderWhenThisIsDeleted)
 Creates an AudioFormatReaderSource for a given reader.
 ~AudioFormatReaderSource ()
 Destructor.
void setLooping (const bool shouldLoop) throw ()
 Toggles loop-mode.
bool isLooping () const
 Returns whether loop-mode is turned on or not.
AudioFormatReadergetAudioFormatReader () const throw ()
 Returns the reader that's being used.
void prepareToPlay (int samplesPerBlockExpected, double sampleRate)
 Implementation of the AudioSource method.
void releaseResources ()
 Implementation of the AudioSource method.
void getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill)
 Implementation of the AudioSource method.
void setNextReadPosition (int newPosition)
 Implements the PositionableAudioSource method.
int getNextReadPosition () const
 Implements the PositionableAudioSource method.
int getTotalLength () const
 Implements the PositionableAudioSource method.

Detailed Description

A type of AudioSource that will read from an AudioFormatReader.

See also:
PositionableAudioSource, AudioTransportSource, BufferingAudioSource

Constructor & Destructor Documentation

AudioFormatReaderSource::AudioFormatReaderSource ( AudioFormatReader *const   sourceReader,
const bool  deleteReaderWhenThisIsDeleted 
)

Creates an AudioFormatReaderSource for a given reader.

Parameters:
sourceReader the reader to use as the data source
deleteReaderWhenThisIsDeleted if true, the reader passed-in will be deleted when this object is deleted; if false it will be left up to the caller to manage its lifetime
AudioFormatReaderSource::~AudioFormatReaderSource (  ) 

Destructor.


Member Function Documentation

void AudioFormatReaderSource::setLooping ( const bool  shouldLoop  )  throw ()

Toggles loop-mode.

If set to true, it will continuously loop the input source. If false, it will just emit silence after the source has finished.

See also:
isLooping
bool AudioFormatReaderSource::isLooping (  )  const [virtual]

Returns whether loop-mode is turned on or not.

Implements PositionableAudioSource.

AudioFormatReader* AudioFormatReaderSource::getAudioFormatReader (  )  const throw ()

Returns the reader that's being used.

void AudioFormatReaderSource::prepareToPlay ( int  samplesPerBlockExpected,
double  sampleRate 
) [virtual]

Implementation of the AudioSource method.

Implements AudioSource.

void AudioFormatReaderSource::releaseResources (  )  [virtual]

Implementation of the AudioSource method.

Implements AudioSource.

void AudioFormatReaderSource::getNextAudioBlock ( const AudioSourceChannelInfo bufferToFill  )  [virtual]

Implementation of the AudioSource method.

Implements AudioSource.

void AudioFormatReaderSource::setNextReadPosition ( int  newPosition  )  [virtual]

Implements the PositionableAudioSource method.

Implements PositionableAudioSource.

int AudioFormatReaderSource::getNextReadPosition (  )  const [virtual]

Implements the PositionableAudioSource method.

Implements PositionableAudioSource.

int AudioFormatReaderSource::getTotalLength (  )  const [virtual]

Implements the PositionableAudioSource method.

Implements PositionableAudioSource.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Apr 26 11:42:09 2010 for JUCE by  doxygen 1.6.3