No Matches
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
StandalonePluginHolder Class Reference

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

#include <juce_StandaloneFilterWindow.h>

Inheritance diagram for StandalonePluginHolder:


struct  PluginInOuts
 Structure used for the number of inputs and outputs. More...

Public Member Functions

 StandalonePluginHolder (PropertySet *settingsToUse, bool takeOwnershipOfSettings=true, const String &preferredDefaultDeviceName=String(), const AudioDeviceManager::AudioDeviceSetup *preferredSetupOptions=nullptr, const Array< PluginInOuts > &channels=Array< PluginInOuts >(), bool shouldAutoOpenMidiDevices=true)
 Creates an instance of the default plugin.
void init (bool enableAudioInput, const String &preferredDefaultDeviceName)
 ~StandalonePluginHolder () override
virtual void createPlugin ()
virtual void deletePlugin ()
int getNumInputChannels () const
int getNumOutputChannels () const
ValuegetMuteInputValue ()
bool getProcessorHasPotentialFeedbackLoop () const
void valueChanged (Value &value) override
 Called when a Value object is changed.
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.
void askUserToLoadState (const String &fileSuffix=String())
 Pops up a dialog letting the user re-load the processor's state from a file.
void startPlaying ()
void stopPlaying ()
void showAudioSettingsDialog ()
 Shows an audio properties dialog box modally.
void saveAudioDeviceState ()
void reloadAudioDeviceState (bool enableAudioInput, const String &preferredDefaultDeviceName, const AudioDeviceManager::AudioDeviceSetup *preferredSetupOptions)
void savePluginState ()
void reloadPluginState ()
void switchToHostApplication ()
bool isInterAppAudioConnected ()
Image getIAAHostIcon (int size)

Static Public Member Functions

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

Public Attributes

OptionalScopedPointer< PropertySetsettings
std::unique_ptr< AudioProcessorprocessor
AudioDeviceManager deviceManager
AudioProcessorPlayer player
Array< PluginInOutschannelConfiguration
bool processorHasPotentialFeedbackLoop = true
std::atomic< bool > muteInput { true }
Value shouldMuteInput
AudioBuffer< float > emptyBuffer
bool autoOpenMidiDevices
std::unique_ptr< AudioDeviceManager::AudioDeviceSetupoptions
Array< MidiDeviceInfolastMidiDevices
std::unique_ptr< FileChooserstateFileChooser
ScopedMessageBox messageBox

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>(),
bool shouldAutoOpenMidiDevices = true )

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 Value::addListener(), channelConfiguration, AudioProcessor::getMainBusNumInputChannels(), init(), RuntimePermissions::isGranted(), isInterAppAudioConnected(), RuntimePermissions::isRequired(), options, processor, RuntimePermissions::recordAudio, RuntimePermissions::request(), and shouldMuteInput.

◆ ~StandalonePluginHolder()

StandalonePluginHolder::~StandalonePluginHolder ( )

References Timer::stopTimer().

Member Function Documentation

◆ init()

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

◆ createPlugin()

virtual void StandalonePluginHolder::createPlugin ( )

◆ deletePlugin()

virtual void StandalonePluginHolder::deletePlugin ( )

◆ getNumInputChannels()

int StandalonePluginHolder::getNumInputChannels ( ) const

◆ getNumOutputChannels()

int StandalonePluginHolder::getNumOutputChannels ( ) const

◆ getFilePatterns()

static String StandalonePluginHolder::getFilePatterns ( const String & fileSuffix)

◆ getMuteInputValue()

Value & StandalonePluginHolder::getMuteInputValue ( )

References shouldMuteInput.

◆ getProcessorHasPotentialFeedbackLoop()

bool StandalonePluginHolder::getProcessorHasPotentialFeedbackLoop ( ) const

◆ valueChanged()

void StandalonePluginHolder::valueChanged ( Value & value)

Called when a Value object is changed.

Note that the Value object passed as a parameter may not be exactly the same object that you registered the listener with - it might be a copy that refers to the same underlying ValueSource. To find out, you can call Value::refersToSameSourceAs().

Implements Value::Listener.

References Value::getValue(), and muteInput.

◆ getLastFile()

File StandalonePluginHolder::getLastFile ( ) const

◆ setLastFile()

void StandalonePluginHolder::setLastFile ( const FileChooser & fc)

◆ askUserToSaveState()

void StandalonePluginHolder::askUserToSaveState ( const String & fileSuffix = String())

◆ askUserToLoadState()

void StandalonePluginHolder::askUserToLoadState ( const String & fileSuffix = String())

◆ startPlaying()

void StandalonePluginHolder::startPlaying ( )

◆ stopPlaying()

void StandalonePluginHolder::stopPlaying ( )

◆ showAudioSettingsDialog()

void StandalonePluginHolder::showAudioSettingsDialog ( )

◆ saveAudioDeviceState()

void StandalonePluginHolder::saveAudioDeviceState ( )

◆ reloadAudioDeviceState()

void StandalonePluginHolder::reloadAudioDeviceState ( bool enableAudioInput,
const String & preferredDefaultDeviceName,
const AudioDeviceManager::AudioDeviceSetup * preferredSetupOptions )

◆ savePluginState()

void StandalonePluginHolder::savePluginState ( )

◆ reloadPluginState()

void StandalonePluginHolder::reloadPluginState ( )

◆ switchToHostApplication()

void StandalonePluginHolder::switchToHostApplication ( )

◆ isInterAppAudioConnected()

bool StandalonePluginHolder::isInterAppAudioConnected ( )

◆ getIAAHostIcon()

Image StandalonePluginHolder::getIAAHostIcon ( int size)

Member Data Documentation

◆ settings

OptionalScopedPointer<PropertySet> StandalonePluginHolder::settings

◆ processor

std::unique_ptr<AudioProcessor> StandalonePluginHolder::processor

◆ deviceManager

AudioDeviceManager StandalonePluginHolder::deviceManager

◆ player

AudioProcessorPlayer StandalonePluginHolder::player

Referenced by startPlaying(), and stopPlaying().

◆ channelConfiguration

Array<PluginInOuts> StandalonePluginHolder::channelConfiguration

◆ processorHasPotentialFeedbackLoop

bool StandalonePluginHolder::processorHasPotentialFeedbackLoop = true

◆ muteInput

std::atomic<bool> StandalonePluginHolder::muteInput { true }

Referenced by valueChanged().

◆ shouldMuteInput

Value StandalonePluginHolder::shouldMuteInput

◆ emptyBuffer

AudioBuffer<float> StandalonePluginHolder::emptyBuffer

◆ autoOpenMidiDevices

bool StandalonePluginHolder::autoOpenMidiDevices

Referenced by init().

◆ options

std::unique_ptr<AudioDeviceManager::AudioDeviceSetup> StandalonePluginHolder::options

Referenced by init(), and StandalonePluginHolder().

◆ lastMidiDevices

Array<MidiDeviceInfo> StandalonePluginHolder::lastMidiDevices

◆ stateFileChooser

std::unique_ptr<FileChooser> StandalonePluginHolder::stateFileChooser

◆ messageBox

ScopedMessageBox StandalonePluginHolder::messageBox

The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram