JUCE
Public Member Functions | List of all members
AudioFormatReaderSource Class Reference

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

+ Inheritance diagram for AudioFormatReaderSource:

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from PositionableAudioSource
 PositionableAudioSource () noexcept
 Creates the PositionableAudioSource. More...
 
- Protected Member Functions inherited from AudioSource
 AudioSource () noexcept
 Creates an AudioSource. More...
 

Detailed Description

A type of AudioSource that will read from an AudioFormatReader.

See also
PositionableAudioSource, AudioTransportSource, BufferingAudioSource

Constructor & Destructor Documentation

AudioFormatReaderSource::AudioFormatReaderSource ( AudioFormatReader sourceReader,
bool  deleteReaderWhenThisIsDeleted 
)

Creates an AudioFormatReaderSource for a given reader.

Parameters
sourceReaderthe reader to use as the data source - this must not be null
deleteReaderWhenThisIsDeletedif 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 ( bool  shouldLoop)
overridevirtual

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

Reimplemented from PositionableAudioSource.

bool AudioFormatReaderSource::isLooping ( ) const
overridevirtual

Returns whether loop-mode is turned on or not.

Implements PositionableAudioSource.

AudioFormatReader* AudioFormatReaderSource::getAudioFormatReader ( ) const
noexcept
void AudioFormatReaderSource::prepareToPlay ( int  samplesPerBlockExpected,
double  sampleRate 
)
overridevirtual

Implementation of the AudioSource method.

Implements AudioSource.

void AudioFormatReaderSource::releaseResources ( )
overridevirtual

Implementation of the AudioSource method.

Implements AudioSource.

void AudioFormatReaderSource::getNextAudioBlock ( const AudioSourceChannelInfo )
overridevirtual

Implementation of the AudioSource method.

Implements AudioSource.

void AudioFormatReaderSource::setNextReadPosition ( int64  newPosition)
overridevirtual

Implements the PositionableAudioSource method.

Implements PositionableAudioSource.

int64 AudioFormatReaderSource::getNextReadPosition ( ) const
overridevirtual

Implements the PositionableAudioSource method.

Implements PositionableAudioSource.

int64 AudioFormatReaderSource::getTotalLength ( ) const
overridevirtual

Implements the PositionableAudioSource method.

Implements PositionableAudioSource.


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