JUCE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | List of all members
AudioProcessorPlayer Class Reference

An AudioIODeviceCallback object which streams audio through an AudioProcessor. More...

Inherits AudioIODeviceCallback, and MidiInputCallback.

Public Member Functions

 AudioProcessorPlayer ()
 
virtual ~AudioProcessorPlayer ()
 Destructor.
 
void setProcessor (AudioProcessor *processorToPlay)
 Sets the processor that should be played.
 
AudioProcessorgetCurrentProcessor () const noexcept
 Returns the current audio processor that is being played.
 
MidiMessageCollectorgetMidiMessageCollector () noexcept
 Returns a midi message collector that you can pass midi messages to if you want them to be injected into the midi stream that is being sent to the processor.
 
void audioDeviceIOCallback (const float **, int, float **, int, int) override
 
void audioDeviceAboutToStart (AudioIODevice *) override
 
void audioDeviceStopped () override
 
void handleIncomingMidiMessage (MidiInput *, const MidiMessage &) override
 
- Public Member Functions inherited from AudioIODeviceCallback
virtual ~AudioIODeviceCallback ()
 Destructor.
 
virtual void audioDeviceError (const String &errorMessage)
 This can be overridden to be told if the device generates an error while operating.
 
- Public Member Functions inherited from MidiInputCallback
virtual ~MidiInputCallback ()
 Destructor.
 
virtual void handlePartialSysexMessage (MidiInput *source, const uint8 *messageData, int numBytesSoFar, double timestamp)
 Notification sent each time a packet of a multi-packet sysex message arrives.
 

Detailed Description

An AudioIODeviceCallback object which streams audio through an AudioProcessor.

To use one of these, just make it the callback used by your AudioIODevice, and give it a processor to use by calling setProcessor().

It's also a MidiInputCallback, so you can connect it to both an audio and midi input to send both streams through the processor.

See Also
AudioProcessor, AudioProcessorGraph

Constructor & Destructor Documentation

AudioProcessorPlayer::AudioProcessorPlayer ( )
virtual AudioProcessorPlayer::~AudioProcessorPlayer ( )
virtual

Destructor.

Member Function Documentation

void AudioProcessorPlayer::setProcessor ( AudioProcessor processorToPlay)

Sets the processor that should be played.

The processor that is passed in will not be deleted or owned by this object. To stop anything playing, pass a nullptr to this method.

Referenced by StandalonePluginHolder::startPlaying(), and StandalonePluginHolder::stopPlaying().

AudioProcessor* AudioProcessorPlayer::getCurrentProcessor ( ) const
noexcept

Returns the current audio processor that is being played.

MidiMessageCollector& AudioProcessorPlayer::getMidiMessageCollector ( )
noexcept

Returns a midi message collector that you can pass midi messages to if you want them to be injected into the midi stream that is being sent to the processor.

void AudioProcessorPlayer::audioDeviceIOCallback ( const float **  ,
int  ,
float **  ,
int  ,
int   
)
overridevirtual

Implements AudioIODeviceCallback.

void AudioProcessorPlayer::audioDeviceAboutToStart ( AudioIODevice )
overridevirtual

Implements AudioIODeviceCallback.

void AudioProcessorPlayer::audioDeviceStopped ( )
overridevirtual

Implements AudioIODeviceCallback.

void AudioProcessorPlayer::handleIncomingMidiMessage ( MidiInput ,
const MidiMessage  
)
overridevirtual

Implements MidiInputCallback.


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