An AudioSource that mixes together the output of a set of other AudioSources.
More...
#include <juce_MixerAudioSource.h>
An AudioSource that mixes together the output of a set of other AudioSources.
Input sources can be added and removed while the mixer is running as long as their prepareToPlay() and releaseResources() methods are called before and after adding them to the mixer.
@tags{Audio}
◆ MixerAudioSource()
juce::MixerAudioSource::MixerAudioSource |
( |
| ) |
|
◆ ~MixerAudioSource()
juce::MixerAudioSource::~MixerAudioSource |
( |
| ) |
|
|
override |
◆ addInputSource()
void juce::MixerAudioSource::addInputSource |
( |
AudioSource * |
newInput, |
|
|
bool |
deleteWhenRemoved |
|
) |
| |
Adds an input source to the mixer.
If the mixer is running you'll need to make sure that the input source is ready to play by calling its prepareToPlay() method before adding it. If the mixer is stopped, then its input sources will be automatically prepared when the mixer's prepareToPlay() method is called.
- Parameters
-
newInput | the source to add to the mixer |
deleteWhenRemoved | if true, then this source will be deleted when no longer needed by the mixer. |
◆ getNextAudioBlock()
◆ prepareToPlay()
void juce::MixerAudioSource::prepareToPlay |
( |
int |
samplesPerBlockExpected, |
|
|
double |
sampleRate |
|
) |
| |
|
overridevirtual |
◆ releaseResources()
void juce::MixerAudioSource::releaseResources |
( |
| ) |
|
|
overridevirtual |
◆ removeAllInputs()
void juce::MixerAudioSource::removeAllInputs |
( |
| ) |
|
Removes all the input sources.
Any sources which were added by calling addInputSource() with the deleteWhenRemoved flag set will be deleted by this method.
◆ removeInputSource()
void juce::MixerAudioSource::removeInputSource |
( |
AudioSource * |
input | ) |
|
Removes an input source.
If the source was added by calling addInputSource() with the deleteWhenRemoved flag set, it will be deleted by this method.
◆ bufferSizeExpected
int juce::MixerAudioSource::bufferSizeExpected |
|
private |
◆ currentSampleRate
double juce::MixerAudioSource::currentSampleRate |
|
private |
◆ inputs
◆ inputsToDelete
◆ lock
◆ tempBuffer
The documentation for this class was generated from the following file: