OpenShot Audio Library | OpenShotAudio 0.3.2
Loading...
Searching...
No Matches
juce::MemoryAudioSource Class Reference

#include <juce_MemoryAudioSource.h>

Inheritance diagram for juce::MemoryAudioSource:
juce::AudioSource

Public Member Functions

 MemoryAudioSource (AudioBuffer< float > &audioBuffer, bool copyMemory, bool shouldLoop=false)
 
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override
 
void releaseResources () override
 
void getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill) override
 
- Public Member Functions inherited from juce::AudioSource
virtual ~AudioSource ()=default
 

Additional Inherited Members

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

Detailed Description

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

Definition at line 32 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.

Member Function Documentation

◆ getNextAudioBlock()

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

Implementation of the AudioSource method.

Implements juce::AudioSource.

Definition at line 45 of file juce_MemoryAudioSource.cpp.

◆ prepareToPlay()

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

Implementation of the AudioSource method.

Implements juce::AudioSource.

Definition at line 38 of file juce_MemoryAudioSource.cpp.

◆ releaseResources()

void juce::MemoryAudioSource::releaseResources ( )
overridevirtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

Definition at line 43 of file juce_MemoryAudioSource.cpp.


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