OpenShot Library | libopenshot-audio
0.2.0
|
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 | prepareToPlay (int samplesPerBlockExpected, double sampleRate) override |
Implementation of the AudioSource method. | |
void | releaseResources () override |
Implementation of the AudioSource method. | |
void | getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill) override |
Implementation of the AudioSource method. | |
![]() | |
virtual | ~AudioSource ()=default |
Destructor. | |
Additional Inherited Members | |
![]() | |
AudioSource ()=default | |
Creates an AudioSource. | |
An AudioSource which takes some float audio data as an input.
Definition at line 36 of file juce_MemoryAudioSource.h.
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.
Definition at line 26 of file juce_MemoryAudioSource.cpp.
References juce::AudioBuffer< Type >::getArrayOfWritePointers(), juce::AudioBuffer< Type >::getNumChannels(), juce::AudioBuffer< Type >::getNumSamples(), juce::AudioBuffer< Type >::makeCopyOf(), and juce::AudioBuffer< Type >::setDataToReferTo().