JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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:
juce::PositionableAudioSource juce::AudioSource

Public Member Functions

 MemoryAudioSource (AudioBuffer< float > &audioBuffer, bool copyMemory, bool shouldLoop=false)
 Creates a MemoryAudioSource by providing an audio buffer.
 
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.
 
void setNextReadPosition (int64 newPosition) override
 Implementation of the PositionableAudioSource method.
 
int64 getNextReadPosition () const override
 Implementation of the PositionableAudioSource method.
 
int64 getTotalLength () const override
 Implementation of the PositionableAudioSource method.
 
bool isLooping () const override
 Implementation of the PositionableAudioSource method.
 
void setLooping (bool shouldLoop) override
 Implementation of the PositionableAudioSource method.
 
- Public Member Functions inherited from juce::PositionableAudioSource
 ~PositionableAudioSource () override=default
 Destructor.
 
- Public Member Functions inherited from juce::AudioSource
virtual ~AudioSource ()=default
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from juce::PositionableAudioSource
 PositionableAudioSource ()=default
 Creates the PositionableAudioSource.
 
- 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.

@tags{Audio}

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.

◆ getNextReadPosition()

int64 juce::MemoryAudioSource::getNextReadPosition ( ) const
overridevirtual

Implementation of the PositionableAudioSource method.

Implements juce::PositionableAudioSource.

Definition at line 86 of file juce_MemoryAudioSource.cpp.

◆ getTotalLength()

int64 juce::MemoryAudioSource::getTotalLength ( ) const
overridevirtual

Implementation of the PositionableAudioSource method.

Implements juce::PositionableAudioSource.

Definition at line 91 of file juce_MemoryAudioSource.cpp.

◆ isLooping()

bool juce::MemoryAudioSource::isLooping ( ) const
overridevirtual

Implementation of the PositionableAudioSource method.

Implements juce::PositionableAudioSource.

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

◆ setLooping()

void juce::MemoryAudioSource::setLooping ( bool  shouldLoop)
overridevirtual

Implementation of the PositionableAudioSource method.

Reimplemented from juce::PositionableAudioSource.

Definition at line 102 of file juce_MemoryAudioSource.cpp.

◆ setNextReadPosition()

void juce::MemoryAudioSource::setNextReadPosition ( int64  newPosition)
overridevirtual

Implementation of the PositionableAudioSource method.

Implements juce::PositionableAudioSource.

Definition at line 81 of file juce_MemoryAudioSource.cpp.


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