JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::AudioPluginFormat Class Referenceabstract

The base class for a type of plugin format, such as VST, AudioUnit, LADSPA, etc. More...

#include <juce_AudioPluginFormat.h>

Inheritance diagram for juce::AudioPluginFormat:

Classes

struct  InstantiationCompletionCallback
 Structure used for callbacks when instantiation is completed. More...
 

Public Member Functions

virtual ~AudioPluginFormat ()
 Destructor. More...
 
virtual bool canScanForPlugins () const =0
 Returns true if this format needs to run a scan to find its list of plugins. More...
 
AudioPluginInstancecreateInstanceFromDescription (const PluginDescription &, double initialSampleRate, int initialBufferSize)
 Tries to recreate a type from a previously generated PluginDescription. More...
 
AudioPluginInstancecreateInstanceFromDescription (const PluginDescription &, double initialSampleRate, int initialBufferSize, String &errorMessage)
 Same as above but with the possibility of returning an error message. More...
 
void createPluginInstanceAsync (const PluginDescription &description, double initialSampleRate, int initialBufferSize, InstantiationCompletionCallback *completionCallback)
 Tries to recreate a type from a previously generated PluginDescription. More...
 
void createPluginInstanceAsync (const PluginDescription &description, double initialSampleRate, int initialBufferSize, std::function< void(AudioPluginInstance *, const String &)> completionCallback)
 
virtual bool doesPluginStillExist (const PluginDescription &)=0
 Checks whether this plugin could possibly be loaded. More...
 
virtual bool fileMightContainThisPluginType (const String &fileOrIdentifier)=0
 Should do a quick check to see if this file or directory might be a plugin of this format. More...
 
virtual void findAllTypesForFile (OwnedArray< PluginDescription > &results, const String &fileOrIdentifier)=0
 This tries to create descriptions for all the plugin types available in a binary module file. More...
 
virtual FileSearchPath getDefaultLocationsToSearch ()=0
 Returns the typical places to look for this kind of plugin. More...
 
virtual String getName () const =0
 Returns the format name. More...
 
virtual String getNameOfPluginFromIdentifier (const String &fileOrIdentifier)=0
 Returns a readable version of the name of the plugin that this identifier refers to. More...
 
virtual bool pluginNeedsRescanning (const PluginDescription &)=0
 Returns true if this plugin's version or date has changed and it should be re-checked. More...
 
virtual StringArray searchPathsForPlugins (const FileSearchPath &directoriesToSearch, bool recursive, bool allowPluginsWhichRequireAsynchronousInstantiation=false)=0
 Searches a suggested set of directories for any plugins in this format. More...
 

Protected Types

using PluginCreationCallback = void(*)(void *, AudioPluginInstance *, const String &)
 

Protected Member Functions

 AudioPluginFormat () noexcept
 
virtual void createPluginInstance (const PluginDescription &, double initialSampleRate, int initialBufferSize, void *userData, PluginCreationCallback)=0
 Implementors must override this function. More...
 
virtual bool requiresUnblockedMessageThreadDuringCreation (const PluginDescription &) const noexcept=0
 

Private Member Functions

void createPluginInstanceOnMessageThread (const PluginDescription &, double rate, int size, AudioPluginFormat::InstantiationCompletionCallback *)
 

Friends

class AudioPluginFormatManager
 

Detailed Description

The base class for a type of plugin format, such as VST, AudioUnit, LADSPA, etc.

See also
AudioPluginFormatManager

{Audio}

Member Typedef Documentation

◆ PluginCreationCallback

using juce::AudioPluginFormat::PluginCreationCallback = void (*) (void*, AudioPluginInstance*, const String&)
protected

Constructor & Destructor Documentation

◆ ~AudioPluginFormat()

virtual juce::AudioPluginFormat::~AudioPluginFormat ( )
virtual

Destructor.

◆ AudioPluginFormat()

juce::AudioPluginFormat::AudioPluginFormat ( )
protectednoexcept

Member Function Documentation

◆ canScanForPlugins()

virtual bool juce::AudioPluginFormat::canScanForPlugins ( ) const
pure virtual

Returns true if this format needs to run a scan to find its list of plugins.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ createInstanceFromDescription() [1/2]

AudioPluginInstance* juce::AudioPluginFormat::createInstanceFromDescription ( const PluginDescription ,
double  initialSampleRate,
int  initialBufferSize 
)

Tries to recreate a type from a previously generated PluginDescription.

See also
AudioPluginFormatManager::createInstance

◆ createInstanceFromDescription() [2/2]

AudioPluginInstance* juce::AudioPluginFormat::createInstanceFromDescription ( const PluginDescription ,
double  initialSampleRate,
int  initialBufferSize,
String errorMessage 
)

Same as above but with the possibility of returning an error message.

See also
AudioPluginFormatManager::createInstance

◆ createPluginInstance()

virtual void juce::AudioPluginFormat::createPluginInstance ( const PluginDescription ,
double  initialSampleRate,
int  initialBufferSize,
void *  userData,
PluginCreationCallback   
)
protectedpure virtual

Implementors must override this function.

This is guaranteed to be called on the message thread. You may call the callback on any thread.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ createPluginInstanceAsync() [1/2]

void juce::AudioPluginFormat::createPluginInstanceAsync ( const PluginDescription description,
double  initialSampleRate,
int  initialBufferSize,
InstantiationCompletionCallback completionCallback 
)

Tries to recreate a type from a previously generated PluginDescription.

See also
AudioPluginFormatManager::createInstanceAsync

◆ createPluginInstanceAsync() [2/2]

void juce::AudioPluginFormat::createPluginInstanceAsync ( const PluginDescription description,
double  initialSampleRate,
int  initialBufferSize,
std::function< void(AudioPluginInstance *, const String &)>  completionCallback 
)

◆ createPluginInstanceOnMessageThread()

void juce::AudioPluginFormat::createPluginInstanceOnMessageThread ( const PluginDescription ,
double  rate,
int  size,
AudioPluginFormat::InstantiationCompletionCallback  
)
private

◆ doesPluginStillExist()

virtual bool juce::AudioPluginFormat::doesPluginStillExist ( const PluginDescription )
pure virtual

Checks whether this plugin could possibly be loaded.

It doesn't actually need to load it, just to check whether the file or component still exists.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ fileMightContainThisPluginType()

virtual bool juce::AudioPluginFormat::fileMightContainThisPluginType ( const String fileOrIdentifier)
pure virtual

Should do a quick check to see if this file or directory might be a plugin of this format.

This is for searching for potential files, so it shouldn't actually try to load the plugin or do anything time-consuming.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ findAllTypesForFile()

virtual void juce::AudioPluginFormat::findAllTypesForFile ( OwnedArray< PluginDescription > &  results,
const String fileOrIdentifier 
)
pure virtual

This tries to create descriptions for all the plugin types available in a binary module file.

The file will be some kind of DLL or bundle.

Normally there will only be one type returned, but some plugins (e.g. VST shells) can use a single DLL to create a set of different plugin subtypes, so in that case, each subtype is returned as a separate object.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ getDefaultLocationsToSearch()

virtual FileSearchPath juce::AudioPluginFormat::getDefaultLocationsToSearch ( )
pure virtual

Returns the typical places to look for this kind of plugin.

Note that if this returns no paths, it means that the format doesn't search in files or folders, e.g. AudioUnits.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ getName()

virtual String juce::AudioPluginFormat::getName ( ) const
pure virtual

Returns the format name.

E.g. "VST", "AudioUnit", etc.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ getNameOfPluginFromIdentifier()

virtual String juce::AudioPluginFormat::getNameOfPluginFromIdentifier ( const String fileOrIdentifier)
pure virtual

Returns a readable version of the name of the plugin that this identifier refers to.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ pluginNeedsRescanning()

virtual bool juce::AudioPluginFormat::pluginNeedsRescanning ( const PluginDescription )
pure virtual

Returns true if this plugin's version or date has changed and it should be re-checked.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

◆ requiresUnblockedMessageThreadDuringCreation()

virtual bool juce::AudioPluginFormat::requiresUnblockedMessageThreadDuringCreation ( const PluginDescription ) const
protectedpure virtualnoexcept

◆ searchPathsForPlugins()

virtual StringArray juce::AudioPluginFormat::searchPathsForPlugins ( const FileSearchPath directoriesToSearch,
bool  recursive,
bool  allowPluginsWhichRequireAsynchronousInstantiation = false 
)
pure virtual

Searches a suggested set of directories for any plugins in this format.

The path might be ignored, e.g. by AUs, which are found by the OS rather than manually.

Parameters
directoriesToSearchThis specifies which directories shall be searched for plug-ins.
recursiveShould the search recursively traverse folders.
allowPluginsWhichRequireAsynchronousInstantiationIf this is false then plug-ins which require asynchronous creation will be excluded.

Implemented in juce::VSTPluginFormat, juce::VST3PluginFormat, juce::AudioUnitPluginFormat, and juce::LADSPAPluginFormat.

Friends And Related Function Documentation

◆ AudioPluginFormatManager

friend class AudioPluginFormatManager
friend

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