An object that creates and plays a standalone instance of an AudioProcessor. More...

Inheritance diagram for StandalonePluginHolder:


struct  PluginInOuts

Public Member Functions

 StandalonePluginHolder (PropertySet *settingsToUse, bool takeOwnershipOfSettings=true, const String &preferredDefaultDeviceName=String(), const AudioDeviceManager::AudioDeviceSetup *preferredSetupOptions=nullptr, const Array< PluginInOuts > &channels=Array< PluginInOuts >())
 Creates an instance of the default plugin. More...
void init (bool enableAudioInput, const String &preferredDefaultDeviceName)
virtual ~StandalonePluginHolder ()
virtual void createPlugin ()
virtual void deletePlugin ()
ValuegetMuteInputValue ()
bool getProcessorHasPotentialFeedbackLoop () const
File getLastFile () const
void setLastFile (const FileChooser &fc)
void askUserToSaveState (const String &fileSuffix=String())
 Pops up a dialog letting the user save the processor's state to a file. More...
void askUserToLoadState (const String &fileSuffix=String())
 Pops up a dialog letting the user re-load the processor's state from a file. More...
void startPlaying ()
void stopPlaying ()
void showAudioSettingsDialog ()
 Shows an audio properties dialog box modally. More...
void saveAudioDeviceState ()
void reloadAudioDeviceState (bool enableAudioInput, const String &preferredDefaultDeviceName, const AudioDeviceManager::AudioDeviceSetup *preferredSetupOptions)
void savePluginState ()
void reloadPluginState ()
void switchToHostApplication ()
bool isInterAppAudioConnected ()

Static Public Member Functions

static String getFilePatterns (const String &fileSuffix)
static StandalonePluginHoldergetInstance ()

Public Attributes

OptionalScopedPointer< PropertySetsettings
ScopedPointer< AudioProcessorprocessor
AudioDeviceManager deviceManager
AudioProcessorPlayer player
Array< PluginInOutschannelConfiguration
bool processorHasPotentialFeedbackLoop = true
Value shouldMuteInput
AudioSampleBuffer emptyBuffer
ScopedPointer< AudioDeviceManager::AudioDeviceSetupoptions
StringArray lastMidiDevices

Detailed Description

An object that creates and plays a standalone instance of an AudioProcessor.

The object will create your processor using the same createPluginFilter() function that the other plugin wrappers use, and will run it through the computer's audio/MIDI devices using AudioDeviceManager and AudioProcessorPlayer.

Constructor & Destructor Documentation

◆ StandalonePluginHolder()

StandalonePluginHolder::StandalonePluginHolder ( PropertySet settingsToUse,
bool  takeOwnershipOfSettings = true,
const String preferredDefaultDeviceName = String(),
const AudioDeviceManager::AudioDeviceSetup preferredSetupOptions = nullptr,
const Array< PluginInOuts > &  channels = Array<PluginInOuts>() 

Creates an instance of the default plugin.

The settings object can be a PropertySet that the class should use to store its settings - the takeOwnershipOfSettings indicates whether this object will delete the settings automatically when no longer needed. The settings can also be nullptr.

A default device name can be passed in.

Preferably a complete setup options object can be used, which takes precedence over the preferredDefaultDeviceName and allows you to select the input & output device names, sample rate, buffer size etc.

In all instances, the settingsToUse will take precedence over the "preferred" options if not null.

References channelConfiguration, createPlugin(), AudioProcessor::getMainBusNumInputChannels(), init(), RuntimePermissions::isGranted(), RuntimePermissions::isRequired(), options, processor, RuntimePermissions::recordAudio, and RuntimePermissions::request().

Referenced by StandaloneFilterWindow::StandaloneFilterWindow().

◆ ~StandalonePluginHolder()

virtual StandalonePluginHolder::~StandalonePluginHolder ( )

Member Function Documentation

◆ init()

void StandalonePluginHolder::init ( bool  enableAudioInput,
const String preferredDefaultDeviceName 

◆ createPlugin()

◆ deletePlugin()

virtual void StandalonePluginHolder::deletePlugin ( )

References processor, and stopPlaying().

Referenced by ~StandalonePluginHolder().

◆ getFilePatterns()

static String StandalonePluginHolder::getFilePatterns ( const String fileSuffix)

◆ getMuteInputValue()

Value& StandalonePluginHolder::getMuteInputValue ( )

References shouldMuteInput.

◆ getProcessorHasPotentialFeedbackLoop()

bool StandalonePluginHolder::getProcessorHasPotentialFeedbackLoop ( ) const

◆ getLastFile()

File StandalonePluginHolder::getLastFile ( ) const

◆ setLastFile()

void StandalonePluginHolder::setLastFile ( const FileChooser fc)

◆ askUserToSaveState()

◆ askUserToLoadState()

◆ startPlaying()

◆ stopPlaying()

void StandalonePluginHolder::stopPlaying ( )

◆ showAudioSettingsDialog()

◆ saveAudioDeviceState()

void StandalonePluginHolder::saveAudioDeviceState ( )

◆ reloadAudioDeviceState()

◆ savePluginState()

void StandalonePluginHolder::savePluginState ( )

◆ reloadPluginState()

◆ switchToHostApplication()

void StandalonePluginHolder::switchToHostApplication ( )

◆ isInterAppAudioConnected()

bool StandalonePluginHolder::isInterAppAudioConnected ( )

Member Data Documentation

◆ settings

◆ processor

◆ deviceManager

◆ player

AudioProcessorPlayer StandalonePluginHolder::player

Referenced by startPlaying(), and stopPlaying().

◆ channelConfiguration

Array<PluginInOuts> StandalonePluginHolder::channelConfiguration

◆ processorHasPotentialFeedbackLoop

bool StandalonePluginHolder::processorHasPotentialFeedbackLoop = true

◆ shouldMuteInput

Value StandalonePluginHolder::shouldMuteInput

◆ emptyBuffer

AudioSampleBuffer StandalonePluginHolder::emptyBuffer

◆ options

ScopedPointer<AudioDeviceManager::AudioDeviceSetup> StandalonePluginHolder::options

Referenced by init(), and StandalonePluginHolder().

◆ lastMidiDevices

StringArray StandalonePluginHolder::lastMidiDevices

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