OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::MixerAudioSource Class Reference

`#include <juce_MixerAudioSource.h>`

Inheritance diagram for juce::MixerAudioSource:

## Public Member Functions
| MixerAudioSource ()
| ~MixerAudioSource () override
void | addInputSource (AudioSource *newInput, bool deleteWhenRemoved)
void | removeInputSource (AudioSource *input)
void | removeAllInputs ()
void | prepareToPlay (int samplesPerBlockExpected, double sampleRate) override
void | releaseResources () override
void | getNextAudioBlock (const AudioSourceChannelInfo &) override
Public Member Functions inherited from juce::AudioSource
virtual | ~AudioSource ()=default
virtual void | prepareToPlay (int samplesPerBlockExpected, double sampleRate)=0
virtual void | releaseResources ()=0
virtual void | getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill)=0

## Additional Inherited Members
Protected Member Functions inherited from juce::AudioSource
| AudioSource ()=default

## Detailed Description

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.

Definition at line 36 of file juce_MixerAudioSource.h.

## Constructor & Destructor Documentation

## ◆ MixerAudioSource()

juce::MixerAudioSource::MixerAudioSource | ( |  | ) |

Creates a MixerAudioSource.

Definition at line 26 of file juce_MixerAudioSource.cpp.

## ◆ ~MixerAudioSource()

juce::MixerAudioSource::~MixerAudioSource | ( |  | ) |
| override

Destructor.

Definition at line 31 of file juce_MixerAudioSource.cpp.

## Member Function Documentation

## ◆ 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.

Definition at line 37 of file juce_MixerAudioSource.cpp.

## ◆ getNextAudioBlock()

void juce::MixerAudioSource::getNextAudioBlock | ( | const AudioSourceChannelInfo & | info | ) |
| override virtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

Definition at line 128 of file juce_MixerAudioSource.cpp.

## ◆ prepareToPlay()

void juce::MixerAudioSource::prepareToPlay | ( | int | samplesPerBlockExpected,
|  | double | sampleRate
| ) |  |
| override virtual

Implementation of the AudioSource method. This will call prepareToPlay() on all its input sources.

Implements juce::AudioSource.

Definition at line 102 of file juce_MixerAudioSource.cpp.

## ◆ releaseResources()

void juce::MixerAudioSource::releaseResources | ( |  | ) |
| override virtual

Implementation of the AudioSource method. This will call releaseResources() on all its input sources.

Implements juce::AudioSource.

Definition at line 115 of file juce_MixerAudioSource.cpp.

## ◆ 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.

Definition at line 84 of file juce_MixerAudioSource.cpp.

Referenced by ~MixerAudioSource().

## ◆ 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.

Definition at line 60 of file juce_MixerAudioSource.cpp.

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

- juce_MixerAudioSource.h
- juce_MixerAudioSource.cpp