OpenShot Library | OpenShotAudio  0.2.2
juce::MemoryAudioSource Class Reference

An AudioSource which takes some float audio data as an input. More...

#include <juce_MemoryAudioSource.h>

+ Inheritance diagram for juce::MemoryAudioSource:

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.
 
- Public Member Functions inherited from juce::AudioSource
virtual ~AudioSource ()=default
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from juce::AudioSource
 AudioSource ()=default
 Creates an AudioSource.
 

Detailed Description

An AudioSource which takes some float audio data as an input.

Definition at line 36 of file juce_MemoryAudioSource.h.

Constructor & Destructor Documentation

◆ MemoryAudioSource()

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().


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