JUCE
|
Base class for an active instance of a plugin. More...
Public Member Functions | |
virtual | ~AudioPluginInstance () |
Destructor. More... | |
virtual void | fillInPluginDescription (PluginDescription &description) const =0 |
Fills-in the appropriate parts of this plugin description object. More... | |
PluginDescription | getPluginDescription () const |
Returns a PluginDescription for this plugin. More... | |
virtual void * | getPlatformSpecificData () |
Returns a pointer to some kind of platform-specific data about the plugin. More... | |
virtual void | refreshParameterList () |
For some formats (currently AudioUnit), this forces a reload of the list of available parameters. More... | |
![]() | |
virtual | ~AudioProcessor () |
Destructor. More... | |
virtual const String | getName () const =0 |
Returns the name of this processor. More... | |
virtual void | prepareToPlay (double sampleRate, int maximumExpectedSamplesPerBlock)=0 |
Called before playback starts, to let the filter prepare itself. More... | |
virtual void | releaseResources ()=0 |
Called after playback has stopped, to let the filter free up any resources it no longer needs. More... | |
virtual void | processBlock (AudioBuffer< float > &buffer, MidiBuffer &midiMessages)=0 |
Renders the next block. More... | |
virtual void | processBlock (AudioBuffer< double > &buffer, MidiBuffer &midiMessages) |
Renders the next block. More... | |
virtual void | processBlockBypassed (AudioBuffer< float > &buffer, MidiBuffer &midiMessages) |
Renders the next block when the processor is being bypassed. More... | |
virtual void | processBlockBypassed (AudioBuffer< double > &buffer, MidiBuffer &midiMessages) |
Renders the next block when the processor is being bypassed. More... | |
virtual bool | setPreferredBusArrangement (bool isInputBus, int busIndex, const AudioChannelSet &preferredSet) |
Called by the host, this attempts to change the plugin's channel layout on a particular bus. More... | |
virtual bool | supportsDoublePrecisionProcessing () const |
Returns true if the Audio processor supports double precision floating point processing. More... | |
ProcessingPrecision | getProcessingPrecision () const noexcept |
Returns the precision-mode of the processor. More... | |
bool | isUsingDoublePrecision () const noexcept |
Returns true if the current precision is set to doublePrecision. More... | |
void | setProcessingPrecision (ProcessingPrecision precision) noexcept |
Changes the processing precision of the receiver. More... | |
AudioPlayHead * | getPlayHead () const noexcept |
Returns the current AudioPlayHead object that should be used to find out the state and position of the playhead. More... | |
int | getTotalNumInputChannels () const noexcept |
Returns the total number of input channels. More... | |
int | getTotalNumOutputChannels () const noexcept |
Returns the total number of output channels. More... | |
int | getMainBusNumInputChannels () const noexcept |
Returns the number of input channels on the main bus. More... | |
int | getMainBusNumOutputChannels () const noexcept |
Returns the number of output channels on the main bus. More... | |
double | getSampleRate () const noexcept |
Returns the current sample rate. More... | |
int | getBlockSize () const noexcept |
Returns the current typical block size that is being used. More... | |
int | getLatencySamples () const noexcept |
This returns the number of samples delay that the filter imposes on the audio passing through it. More... | |
void | setLatencySamples (int newLatency) |
The filter should call this to set the number of samples delay that it introduces. More... | |
virtual double | getTailLengthSeconds () const =0 |
Returns the length of the filter's tail, in seconds. More... | |
virtual bool | acceptsMidi () const =0 |
Returns true if the processor wants midi messages. More... | |
virtual bool | producesMidi () const =0 |
Returns true if the processor produces midi messages. More... | |
virtual bool | supportsMPE () const |
Returns true if the processor supports MPE. More... | |
const CriticalSection & | getCallbackLock () const noexcept |
This returns a critical section that will automatically be locked while the host is calling the processBlock() method. More... | |
void | suspendProcessing (bool shouldBeSuspended) |
Enables and disables the processing callback. More... | |
bool | isSuspended () const noexcept |
Returns true if processing is currently suspended. More... | |
virtual void | reset () |
A plugin can override this to be told when it should reset any playing voices. More... | |
bool | isNonRealtime () const noexcept |
Returns true if the processor is being run in an offline mode for rendering. More... | |
virtual void | setNonRealtime (bool isNonRealtime) noexcept |
Called by the host to tell this processor whether it's being used in a non-realtime capacity for offline rendering or bouncing. More... | |
virtual AudioProcessorEditor * | createEditor ()=0 |
Creates the filter's UI. More... | |
virtual bool | hasEditor () const =0 |
Your filter must override this and return true if it can create an editor component. More... | |
AudioProcessorEditor * | getActiveEditor () const noexcept |
Returns the active editor, if there is one. More... | |
AudioProcessorEditor * | createEditorIfNeeded () |
Returns the active editor, or if there isn't one, it will create one. More... | |
virtual int | getNumParameters () |
This must return the correct value immediately after the object has been created, and mustn't change the number of parameters later. More... | |
virtual const String | getParameterName (int parameterIndex) |
Returns the name of a particular parameter. More... | |
virtual float | getParameter (int parameterIndex) |
Called by the host to find out the value of one of the filter's parameters. More... | |
virtual String | getParameterName (int parameterIndex, int maximumStringLength) |
Returns the name of a parameter as a text string with a preferred maximum length. More... | |
virtual const String | getParameterText (int parameterIndex) |
Returns the value of a parameter as a text string. More... | |
virtual String | getParameterText (int parameterIndex, int maximumStringLength) |
Returns the value of a parameter as a text string with a preferred maximum length. More... | |
virtual int | getParameterNumSteps (int parameterIndex) |
Returns the number of discrete steps that this parameter can represent. More... | |
virtual float | getParameterDefaultValue (int parameterIndex) |
Returns the default value for the parameter. More... | |
virtual String | getParameterLabel (int index) const |
Some plugin types may be able to return a label string for a parameter's units. More... | |
virtual bool | isParameterOrientationInverted (int index) const |
This can be overridden to tell the host that particular parameters operate in the reverse direction. More... | |
virtual void | setParameter (int parameterIndex, float newValue) |
The host will call this method to change the value of one of the filter's parameters. More... | |
void | setParameterNotifyingHost (int parameterIndex, float newValue) |
Your filter can call this when it needs to change one of its parameters. More... | |
virtual bool | isParameterAutomatable (int parameterIndex) const |
Returns true if the host can automate this parameter. More... | |
virtual bool | isMetaParameter (int parameterIndex) const |
Should return true if this parameter is a "meta" parameter. More... | |
void | beginParameterChangeGesture (int parameterIndex) |
Sends a signal to the host to tell it that the user is about to start changing this parameter. More... | |
void | endParameterChangeGesture (int parameterIndex) |
Tells the host that the user has finished changing this parameter. More... | |
void | updateHostDisplay () |
The filter can call this when something (apart from a parameter value) has changed. More... | |
void | addParameter (AudioProcessorParameter *) |
Adds a parameter to the list. More... | |
const OwnedArray< AudioProcessorParameter > & | getParameters () const noexcept |
Returns the current list of parameters. More... | |
virtual int | getNumPrograms ()=0 |
Returns the number of preset programs the filter supports. More... | |
virtual int | getCurrentProgram ()=0 |
Returns the number of the currently active program. More... | |
virtual void | setCurrentProgram (int index)=0 |
Called by the host to change the current program. More... | |
virtual const String | getProgramName (int index)=0 |
Must return the name of a given program. More... | |
virtual void | changeProgramName (int index, const String &newName)=0 |
Called by the host to rename a program. More... | |
virtual void | getStateInformation (juce::MemoryBlock &destData)=0 |
The host will call this method when it wants to save the filter's internal state. More... | |
virtual void | getCurrentProgramStateInformation (juce::MemoryBlock &destData) |
The host will call this method if it wants to save the state of just the filter's current program. More... | |
virtual void | setStateInformation (const void *data, int sizeInBytes)=0 |
This must restore the filter's state from a block of data previously created using getStateInformation(). More... | |
virtual void | setCurrentProgramStateInformation (const void *data, int sizeInBytes) |
The host will call this method if it wants to restore the state of just the filter's current program. More... | |
virtual void | numChannelsChanged () |
This method is called when the number of input or output channels is changed. More... | |
virtual void | addListener (AudioProcessorListener *newListener) |
Adds a listener that will be called when an aspect of this processor changes. More... | |
virtual void | removeListener (AudioProcessorListener *listenerToRemove) |
Removes a previously added listener. More... | |
virtual void | setPlayHead (AudioPlayHead *newPlayHead) |
Tells the processor to use this playhead object. More... | |
void | setPlayConfigDetails (int numIns, int numOuts, double sampleRate, int blockSize) |
This is called by the processor to specify its details before being played. More... | |
void | setRateAndBufferSizeDetails (double sampleRate, int blockSize) noexcept |
This is called by the processor to specify its details before being played. More... | |
void | editorBeingDeleted (AudioProcessorEditor *) noexcept |
Not for public use - this is called before deleting an editor component. More... | |
Protected Member Functions | |
AudioPluginInstance () | |
![]() | |
AudioProcessor () | |
Constructor. More... | |
void | sendParamChangeMessageToListeners (int parameterIndex, float newValue) |
Additional Inherited Members | |
![]() | |
enum | ProcessingPrecision { singlePrecision, doublePrecision } |
enum | WrapperType { wrapperType_Undefined = 0, wrapperType_VST, wrapperType_VST3, wrapperType_AudioUnit, wrapperType_AudioUnitv3, wrapperType_RTAS, wrapperType_AAX, wrapperType_Standalone } |
Flags to indicate the type of plugin context in which a processor is being used. More... | |
![]() | |
static int | getDefaultNumParameterSteps () noexcept |
Returns the default number of steps for a parameter. More... | |
static void | copyXmlToBinary (const XmlElement &xml, juce::MemoryBlock &destData) |
Helper function that just converts an xml element into a binary blob. More... | |
static XmlElement * | getXmlFromBinary (const void *data, int sizeInBytes) |
Retrieves an XML element that was stored as binary with the copyXmlToBinary() method. More... | |
static void JUCE_CALLTYPE | setTypeOfNextNewPlugin (WrapperType) |
![]() | |
AudioBusArrangement | busArrangement |
The processor's bus arrangement. More... | |
WrapperType | wrapperType |
When loaded by a plugin wrapper, this flag will be set to indicate the type of plugin within which the processor is running. More... | |
![]() | |
AudioPlayHead * | playHead |
Base class for an active instance of a plugin.
This derives from the AudioProcessor class, and adds some extra functionality that helps when wrapping dynamically loaded plugins.
This class is not needed when writing plugins, and you should never need to derive your own sub-classes from it. The plugin hosting classes use it internally and will return AudioPluginInstance objects which wrap external plugins.
|
virtual |
Destructor.
Make sure that you delete any UI components that belong to this plugin before deleting the plugin.
|
protected |
References JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR.
|
pure virtual |
Fills-in the appropriate parts of this plugin description object.
Implemented in AudioProcessorGraph::AudioGraphIOProcessor.
Referenced by AudioProcessorGraph::AudioGraphIOProcessor::getParentGraph().
PluginDescription AudioPluginInstance::getPluginDescription | ( | ) | const |
Returns a PluginDescription for this plugin.
This is just a convenience method to avoid calling fillInPluginDescription.
|
virtual |
Returns a pointer to some kind of platform-specific data about the plugin.
E.g. For a VST, this value can be cast to an AEffect*. For an AudioUnit, it can be cast to an AudioUnit handle.
|
virtual |
For some formats (currently AudioUnit), this forces a reload of the list of available parameters.