A type of AudioSource that will read from an AudioFormatReader. More...
Inherits PositionableAudioSource.
Public Member Functions | |
| AudioFormatReaderSource (AudioFormatReader *sourceReader, bool deleteReaderWhenThisIsDeleted) | |
| Creates an AudioFormatReaderSource for a given reader. | |
| ~AudioFormatReaderSource () | |
| Destructor. | |
| void | setLooping (bool shouldLoop) |
| Toggles loop-mode. | |
| bool | isLooping () const |
| 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) |
| Implementation of the AudioSource method. | |
| void | releaseResources () |
| Implementation of the AudioSource method. | |
| void | getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill) |
| Implementation of the AudioSource method. | |
| void | setNextReadPosition (int64 newPosition) |
| Implements the PositionableAudioSource method. | |
| int64 | getNextReadPosition () const |
| Implements the PositionableAudioSource method. | |
| int64 | getTotalLength () const |
| Implements the PositionableAudioSource method. | |
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 |
| AudioFormatReaderSource::~AudioFormatReaderSource | ( | ) |
Destructor.
| void AudioFormatReaderSource::setLooping | ( | bool | shouldLoop ) | [virtual] |
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.
| bool AudioFormatReaderSource::isLooping | ( | ) | const [virtual] |
Returns whether loop-mode is turned on or not.
Implements PositionableAudioSource.
| AudioFormatReader* AudioFormatReaderSource::getAudioFormatReader | ( | ) | const |
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 | ( | int64 | newPosition ) | [virtual] |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.
| int64 AudioFormatReaderSource::getNextReadPosition | ( | ) | const [virtual] |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.
| int64 AudioFormatReaderSource::getTotalLength | ( | ) | const [virtual] |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.