JUCE
Public Member Functions | List of all members
juce::MemoryAudioSource Class Reference

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

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. More...
 
void releaseResources () override
 Implementation of the AudioSource method. More...
 
void getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill) override
 Implementation of the AudioSource method. More...
 
- Public Member Functions inherited from juce::AudioSource
virtual ~AudioSource ()
 Destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from juce::AudioSource
 AudioSource () noexcept
 Creates an AudioSource. More...
 

Detailed Description

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

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.

Member Function Documentation

◆ prepareToPlay()

void juce::MemoryAudioSource::prepareToPlay ( int  samplesPerBlockExpected,
double  sampleRate 
)
overridevirtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

◆ releaseResources()

void juce::MemoryAudioSource::releaseResources ( )
overridevirtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

◆ getNextAudioBlock()

void juce::MemoryAudioSource::getNextAudioBlock ( const AudioSourceChannelInfo bufferToFill)
overridevirtual

Implementation of the AudioSource method.

Implements juce::AudioSource.


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