JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
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:
juce::MessageListener juce::AudioUnitPluginFormat juce::LADSPAPluginFormat juce::LV2PluginFormat juce::VST3PluginFormat juce::VSTPluginFormat

Classes

struct  AsyncCreateMessage
 

Public Types

using PluginCreationCallback = std::function< void(std::unique_ptr< AudioPluginInstance >, const String &)>
 A callback lambda that is passed to createPluginInstanceAsync()
 
using ARAFactoryCreationCallback = std::function< void(ARAFactoryResult)>
 A callback lambda that is passed to getARAFactory()
 

Public Member Functions

 ~AudioPluginFormat () override
 Destructor.
 
virtual String getName () const =0
 Returns the format name.
 
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.
 
std::unique_ptr< AudioPluginInstancecreateInstanceFromDescription (const PluginDescription &, double initialSampleRate, int initialBufferSize)
 Tries to recreate a type from a previously generated PluginDescription.
 
std::unique_ptr< AudioPluginInstancecreateInstanceFromDescription (const PluginDescription &, double initialSampleRate, int initialBufferSize, String &errorMessage)
 Same as above but with the possibility of returning an error message.
 
void createPluginInstanceAsync (const PluginDescription &description, double initialSampleRate, int initialBufferSize, PluginCreationCallback)
 Tries to recreate a type from a previously generated PluginDescription.
 
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.
 
virtual String getNameOfPluginFromIdentifier (const String &fileOrIdentifier)=0
 Returns a readable version of the name of the plugin that this identifier refers to.
 
virtual bool pluginNeedsRescanning (const PluginDescription &)=0
 Returns true if this plugin's version or date has changed and it should be re-checked.
 
virtual bool doesPluginStillExist (const PluginDescription &)=0
 Checks whether this plugin could possibly be loaded.
 
virtual bool canScanForPlugins () const =0
 Returns true if this format needs to run a scan to find its list of plugins.
 
virtual bool isTrivialToScan () const =0
 Should return true if this format is both safe and quick to scan - i.e.
 
virtual StringArray searchPathsForPlugins (const FileSearchPath &directoriesToSearch, bool recursive, bool allowPluginsWhichRequireAsynchronousInstantiation=false)=0
 Searches a suggested set of directories for any plugins in this format.
 
virtual FileSearchPath getDefaultLocationsToSearch ()=0
 Returns the typical places to look for this kind of plugin.
 
virtual bool requiresUnblockedMessageThreadDuringCreation (const PluginDescription &) const =0
 Returns true if instantiation of this plugin type must be done from a non-message thread.
 
virtual void createARAFactoryAsync (const PluginDescription &, ARAFactoryCreationCallback callback)
 Tries to create an ::ARAFactoryWrapper for this description.
 

Protected Member Functions

virtual void createPluginInstance (const PluginDescription &, double initialSampleRate, int initialBufferSize, PluginCreationCallback)=0
 Implementors must override this function.
 

Friends

class AudioPluginFormatManager
 

Detailed Description

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

See also
AudioPluginFormatManager

@tags{Audio}

Definition at line 37 of file juce_AudioPluginFormat.h.

Member Typedef Documentation

◆ ARAFactoryCreationCallback

A callback lambda that is passed to getARAFactory()

Definition at line 144 of file juce_AudioPluginFormat.h.

◆ PluginCreationCallback

A callback lambda that is passed to createPluginInstanceAsync()

Definition at line 77 of file juce_AudioPluginFormat.h.

Constructor & Destructor Documentation

◆ ~AudioPluginFormat()

juce::AudioPluginFormat::~AudioPluginFormat ( )
override

Destructor.

Definition at line 30 of file juce_AudioPluginFormat.cpp.

◆ AudioPluginFormat()

juce::AudioPluginFormat::AudioPluginFormat ( )
protected

Definition at line 29 of file juce_AudioPluginFormat.cpp.

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::AudioUnitPluginFormat, juce::LADSPAPluginFormat, juce::LV2PluginFormat, juce::VST3PluginFormat, and juce::VSTPluginFormat.

◆ createARAFactoryAsync()

virtual void juce::AudioPluginFormat::createARAFactoryAsync ( const PluginDescription ,
ARAFactoryCreationCallback  callback 
)
virtual

Tries to create an ::ARAFactoryWrapper for this description.

The result of the operation will be wrapped into an ARAFactoryResult, which will be passed to a callback object supplied by the caller.

See also
AudioPluginFormatManager::createARAFactoryAsync

Reimplemented in juce::AudioUnitPluginFormat, and juce::VST3PluginFormat.

Definition at line 153 of file juce_AudioPluginFormat.h.

◆ createInstanceFromDescription() [1/2]

std::unique_ptr< AudioPluginInstance > juce::AudioPluginFormat::createInstanceFromDescription ( const PluginDescription desc,
double  initialSampleRate,
int  initialBufferSize 
)

Tries to recreate a type from a previously generated PluginDescription.

See also
AudioPluginFormatManager::createInstance

Definition at line 32 of file juce_AudioPluginFormat.cpp.

◆ createInstanceFromDescription() [2/2]

std::unique_ptr< AudioPluginInstance > juce::AudioPluginFormat::createInstanceFromDescription ( const PluginDescription desc,
double  initialSampleRate,
int  initialBufferSize,
String errorMessage 
)

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

See also
AudioPluginFormatManager::createInstance

Definition at line 40 of file juce_AudioPluginFormat.cpp.

◆ createPluginInstance()

virtual void juce::AudioPluginFormat::createPluginInstance ( const PluginDescription ,
double  initialSampleRate,
int  initialBufferSize,
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.

◆ createPluginInstanceAsync()

void juce::AudioPluginFormat::createPluginInstanceAsync ( const PluginDescription description,
double  initialSampleRate,
int  initialBufferSize,
PluginCreationCallback  callback 
)

Tries to recreate a type from a previously generated PluginDescription.

When the plugin has been created, it will be passed to the caller via an asynchronous call to the PluginCreationCallback lambda that was provided.

See also
AudioPluginFormatManager::createPluginInstanceAsync

Definition at line 84 of file juce_AudioPluginFormat.cpp.

◆ 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::AudioUnitPluginFormat, juce::LADSPAPluginFormat, juce::LV2PluginFormat, juce::VST3PluginFormat, and juce::VSTPluginFormat.

◆ 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::AudioUnitPluginFormat, juce::LADSPAPluginFormat, juce::LV2PluginFormat, juce::VST3PluginFormat, and juce::VSTPluginFormat.

◆ 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::AudioUnitPluginFormat, juce::LADSPAPluginFormat, juce::VST3PluginFormat, juce::VSTPluginFormat, and juce::LV2PluginFormat.

◆ 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::AudioUnitPluginFormat, juce::LADSPAPluginFormat, juce::LV2PluginFormat, juce::VST3PluginFormat, and juce::VSTPluginFormat.

◆ getName()

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

Returns the format name.

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

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

◆ 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::AudioUnitPluginFormat, juce::LADSPAPluginFormat, juce::LV2PluginFormat, juce::VST3PluginFormat, and juce::VSTPluginFormat.

◆ isTrivialToScan()

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

Should return true if this format is both safe and quick to scan - i.e.

if a file can be scanned within a few milliseconds on a background thread, without actually needing to load an executable.

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

◆ 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::AudioUnitPluginFormat, juce::LADSPAPluginFormat, juce::LV2PluginFormat, juce::VST3PluginFormat, and juce::VSTPluginFormat.

◆ 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::AudioUnitPluginFormat, juce::LADSPAPluginFormat, juce::VST3PluginFormat, juce::VSTPluginFormat, and juce::LV2PluginFormat.

Friends And Related Symbol Documentation

◆ AudioPluginFormatManager

Definition at line 157 of file juce_AudioPluginFormat.h.


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