An AudioSource which takes some float audio data as an input. More...
#include <juce_MemoryAudioSource.h>
Public Member Functions | |
MemoryAudioSource (AudioBuffer< float > &audioBuffer, bool copyMemory, bool shouldLoop=false) | |
Creates a MemoryAudioSource by providing an audio buffer. More... | |
void | getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill) override |
Implementation of the AudioSource method. More... | |
int64 | getNextReadPosition () const override |
Implementation of the PositionableAudioSource method. More... | |
int64 | getTotalLength () const override |
Implementation of the PositionableAudioSource method. More... | |
bool | isLooping () const override |
Implementation of the PositionableAudioSource method. More... | |
void | prepareToPlay (int samplesPerBlockExpected, double sampleRate) override |
Implementation of the AudioSource method. More... | |
void | releaseResources () override |
Implementation of the AudioSource method. More... | |
void | setLooping (bool shouldLoop) override |
Implementation of the PositionableAudioSource method. More... | |
void | setNextReadPosition (int64 newPosition) override |
Implementation of the PositionableAudioSource method. More... | |
Private Attributes | |
AudioBuffer< float > | buffer |
bool | isCurrentlyLooping |
int | position = 0 |
An AudioSource which takes some float audio data as an input.
@tags{Audio}
juce::MemoryAudioSource::MemoryAudioSource | ( | AudioBuffer< float > & | audioBuffer, |
bool | copyMemory, | ||
bool | shouldLoop = false |
||
) |
Creates a MemoryAudioSource by providing an audio buffer.
If copyMemory is true then the buffer will be copied into an internal buffer which will be owned by the MemoryAudioSource. If copyMemory is false, then you must ensure that the lifetime of the audio buffer is at least as long as the MemoryAudioSource.
|
overridevirtual |
Implementation of the AudioSource method.
Implements juce::AudioSource.
|
overridevirtual |
Implementation of the PositionableAudioSource method.
Implements juce::PositionableAudioSource.
|
overridevirtual |
Implementation of the PositionableAudioSource method.
Implements juce::PositionableAudioSource.
|
overridevirtual |
Implementation of the PositionableAudioSource method.
Implements juce::PositionableAudioSource.
|
overridevirtual |
Implementation of the AudioSource method.
Implements juce::AudioSource.
|
overridevirtual |
Implementation of the AudioSource method.
Implements juce::AudioSource.
|
overridevirtual |
Implementation of the PositionableAudioSource method.
Reimplemented from juce::PositionableAudioSource.
|
overridevirtual |
Implementation of the PositionableAudioSource method.
Implements juce::PositionableAudioSource.
|
private |
|
private |
|
private |