A type of AudioSource that will read from an AudioFormatReader. More...
Public Member Functions | |
AudioFormatReaderSource (AudioFormatReader *sourceReader, bool deleteReaderWhenThisIsDeleted) | |
Creates an AudioFormatReaderSource for a given reader. | |
~AudioFormatReaderSource () override | |
Destructor. | |
void | setLooping (bool shouldLoop) override |
Toggles loop-mode. | |
bool | isLooping () const override |
Returns whether loop-mode is turned on or not. | |
AudioFormatReader * | getAudioFormatReader () const noexcept |
Returns the reader that's being used. | |
void | prepareToPlay (int samplesPerBlockExpected, double sampleRate) override |
Implementation of the AudioSource method. | |
void | releaseResources () override |
Implementation of the AudioSource method. | |
void | getNextAudioBlock (const AudioSourceChannelInfo &) override |
Implementation of the AudioSource method. | |
void | setNextReadPosition (int64 newPosition) override |
Implements the PositionableAudioSource method. | |
int64 | getNextReadPosition () const override |
Implements the PositionableAudioSource method. | |
int64 | getTotalLength () const override |
Implements the PositionableAudioSource method. | |
![]() | |
~PositionableAudioSource () override=default | |
Destructor. | |
![]() | |
virtual | ~AudioSource ()=default |
Destructor. | |
Additional Inherited Members | |
![]() | |
PositionableAudioSource ()=default | |
Creates the PositionableAudioSource. | |
![]() | |
AudioSource ()=default | |
Creates an AudioSource. | |
A type of AudioSource that will read from an AudioFormatReader.
AudioFormatReaderSource::AudioFormatReaderSource | ( | AudioFormatReader * | sourceReader, |
bool | deleteReaderWhenThisIsDeleted ) |
Creates an AudioFormatReaderSource for a given reader.
sourceReader | the reader to use as the data source - this must not be null |
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 |
Referenced by getTotalLength().
|
override |
Destructor.
|
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.
Reimplemented from PositionableAudioSource.
|
overridevirtual |
Returns whether loop-mode is turned on or not.
Implements PositionableAudioSource.
|
noexcept |
Returns the reader that's being used.
|
overridevirtual |
Implementation of the AudioSource method.
Implements AudioSource.
|
overridevirtual |
Implementation of the AudioSource method.
Implements AudioSource.
|
overridevirtual |
Implementation of the AudioSource method.
Implements AudioSource.
|
overridevirtual |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.
|
overridevirtual |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.
|
overridevirtual |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.
References AudioFormatReaderSource().