Loading...
Searching...
No Matches
juce::VSTPluginFormatHeadless Class Reference

## Detailed Description

Implements a plugin format manager for VSTs.

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

- juce_audio_processors_headless/format_types/juce_VSTPluginFormatHeadless.h

Inheritance diagram for juce::VSTPluginFormatHeadless:

## Classes

class | ExtraFunctions
| Base class for some extra functions that can be attached to a VST plugin instance. More...

## Public Member Functions

| VSTPluginFormatHeadless ()=default
String | getName () const override
| Returns the format name.
bool | canScanForPlugins () const override
| Returns true if this format needs to run a scan to find its list of plugins.
bool | isTrivialToScan () const override
| Should return true if this format is both safe and quick to scan - i.e.
void | findAllTypesForFile (OwnedArray< PluginDescription > &, const String &fileOrIdentifier) override
| This tries to create descriptions for all the plugin types available in a binary module file.
bool | fileMightContainThisPluginType (const String &fileOrIdentifier) override
| Should do a quick check to see if this file or directory might be a plugin of this format.
String | getNameOfPluginFromIdentifier (const String &fileOrIdentifier) override
| Returns a readable version of the name of the plugin that this identifier refers to.
bool | pluginNeedsRescanning (const PluginDescription &) override
| Returns true if this plugin's version or date has changed and it should be re-checked.
StringArray | searchPathsForPlugins (const FileSearchPath &, bool recursive, bool) override
| Searches a suggested set of directories for any plugins in this format.
bool | doesPluginStillExist (const PluginDescription &) override
| Checks whether this plugin could possibly be loaded.
FileSearchPath | getDefaultLocationsToSearch () override
| Returns the typical places to look for this kind of plugin.
virtual void | aboutToScanVSTShellPlugin (const PluginDescription &)
| Can be overridden to receive a callback when each member of a shell plugin is about to be tested during a call to findAllTypesForFile().
Public Member Functions inherited from juce::AudioPluginFormat
| ~AudioPluginFormat () override
| Destructor.
std::unique_ptr< AudioPluginInstance > | createInstanceFromDescription (const PluginDescription &, double initialSampleRate, int initialBufferSize)
| Tries to recreate a type from a previously generated PluginDescription.
std::unique_ptr< AudioPluginInstance > | createInstanceFromDescription (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 void | createARAFactoryAsync (const PluginDescription &, ARAFactoryCreationCallback callback)
| Tries to create an ::ARAFactoryWrapper for this description.

## Static Public Member Functions

static const XmlElement * | getVSTXML (AudioPluginInstance *plugin)
| Attempts to retrieve the VSTXML data from a plugin.
static bool | loadFromFXBFile (AudioPluginInstance *plugin, const void *data, size_t dataSize)
| Attempts to reload a VST plugin's state from some FXB or FXP data.
static bool | saveToFXBFile (AudioPluginInstance *plugin, MemoryBlock &result, bool asFXB)
| Attempts to save a VST's state to some FXP or FXB data.
static bool | getChunkData (AudioPluginInstance *plugin, MemoryBlock &result, bool isPreset)
| Attempts to get a VST's state as a chunk of memory.
static bool | setChunkData (AudioPluginInstance *plugin, const void *data, int size, bool isPreset)
| Attempts to set a VST's state from a chunk of memory.
static AudioPluginInstance * | createCustomVSTFromMainCall (void *entryPointFunction, double initialSampleRate, int initialBufferSize)
| Given a suitable function pointer to a VSTPluginMain function, this will attempt to instantiate and return a plugin for it.
static void | setExtraFunctions (AudioPluginInstance *plugin, ExtraFunctions *functions)
| Provides an ExtraFunctions callback object for a plugin to use.
static pointer_sized_int JUCE_CALLTYPE | dispatcher (AudioPluginInstance *, int32, int32, pointer_sized_int, void *, float)
| This simply calls directly to the VST's AEffect::dispatcher() function.
static AudioPluginInstance * | getPluginInstanceFromVstEffectInterface (void *aEffect)
| Given a VstEffectInterface* (aka vst::AEffect*), this will return the juce AudioPluginInstance that is being used to wrap it.
static String | getFormatName ()

## Additional Inherited Members

Public Types inherited from juce::AudioPluginFormat
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().
Protected Member Functions inherited from juce::AudioPluginFormat
| AudioPluginFormat ()

## Constructors and Destructors

## VSTPluginFormatHeadless()

juce::VSTPluginFormatHeadless::VSTPluginFormatHeadless | ( |  | ) |

default

Referenced by aboutToScanVSTShellPlugin().

## Member Functions

## getVSTXML()

const XmlElement * juce::VSTPluginFormatHeadless::getVSTXML | ( | AudioPluginInstance * | plugin | ) |

static

Attempts to retrieve the VSTXML data from a plugin.

Will return nullptr if the plugin isn't a VST, or if it doesn't have any VSTXML.

## loadFromFXBFile()

bool juce::VSTPluginFormatHeadless::loadFromFXBFile | ( | AudioPluginInstance * | plugin,
|  | const void * | data,
|  | size_t | dataSize )

static

Attempts to reload a VST plugin's state from some FXB or FXP data.

## saveToFXBFile()

bool juce::VSTPluginFormatHeadless::saveToFXBFile | ( | AudioPluginInstance * | plugin,
|  | MemoryBlock & | result,
|  | bool | asFXB )

static

Attempts to save a VST's state to some FXP or FXB data.

## getChunkData()

bool juce::VSTPluginFormatHeadless::getChunkData | ( | AudioPluginInstance * | plugin,
|  | MemoryBlock & | result,
|  | bool | isPreset )

static

Attempts to get a VST's state as a chunk of memory.

## setChunkData()

bool juce::VSTPluginFormatHeadless::setChunkData | ( | AudioPluginInstance * | plugin,
|  | const void * | data,
|  | int | size,
|  | bool | isPreset )

static

Attempts to set a VST's state from a chunk of memory.

## createCustomVSTFromMainCall()

AudioPluginInstance * juce::VSTPluginFormatHeadless::createCustomVSTFromMainCall | ( | void * | entryPointFunction,
|  | double | initialSampleRate,
|  | int | initialBufferSize )

static

Given a suitable function pointer to a VSTPluginMain function, this will attempt to instantiate and return a plugin for it.

## setExtraFunctions()

void juce::VSTPluginFormatHeadless::setExtraFunctions | ( | AudioPluginInstance * | plugin,
|  | ExtraFunctions * | functions )

static

Provides an ExtraFunctions callback object for a plugin to use.

The plugin will take ownership of the object and will delete it automatically.

## dispatcher()

pointer_sized_int JUCE_CALLTYPE juce::VSTPluginFormatHeadless::dispatcher | ( | AudioPluginInstance * | ,
|  | int32 | ,
|  | int32 | ,
|  | pointer_sized_int | ,
|  | void * | ,
|  | float | )

static

This simply calls directly to the VST's AEffect::dispatcher() function.

References JUCE_CALLTYPE.

## getPluginInstanceFromVstEffectInterface()

AudioPluginInstance * juce::VSTPluginFormatHeadless::getPluginInstanceFromVstEffectInterface | ( | void * | aEffect | ) |

static

Given a VstEffectInterface* (aka vst::AEffect*), this will return the juce AudioPluginInstance that is being used to wrap it.

## getFormatName()

String juce::VSTPluginFormatHeadless::getFormatName | ( |  | ) |

inline static

Referenced by getName().

## getName()

String juce::VSTPluginFormatHeadless::getName | ( |  | ) | const

inline override virtual

Returns the format name.

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

Implements juce::AudioPluginFormat.

References getFormatName().

## canScanForPlugins()

bool juce::VSTPluginFormatHeadless::canScanForPlugins | ( |  | ) | const

inline override virtual

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

Implements juce::AudioPluginFormat.

## isTrivialToScan()

bool juce::VSTPluginFormatHeadless::isTrivialToScan | ( |  | ) | const

inline override 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.

Implements juce::AudioPluginFormat.

## findAllTypesForFile()

void juce::VSTPluginFormatHeadless::findAllTypesForFile | ( | OwnedArray< PluginDescription > & | results,
|  | const String & | fileOrIdentifier )

override 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.

Implements juce::AudioPluginFormat.

## fileMightContainThisPluginType()

bool juce::VSTPluginFormatHeadless::fileMightContainThisPluginType | ( | const String & | fileOrIdentifier | ) |

override 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.

Implements juce::AudioPluginFormat.

## getNameOfPluginFromIdentifier()

String juce::VSTPluginFormatHeadless::getNameOfPluginFromIdentifier | ( | const String & | fileOrIdentifier | ) |

override virtual

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

Implements juce::AudioPluginFormat.

## pluginNeedsRescanning()

bool juce::VSTPluginFormatHeadless::pluginNeedsRescanning | ( | const PluginDescription & |  | ) |

override virtual

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

Implements juce::AudioPluginFormat.

## searchPathsForPlugins()

StringArray juce::VSTPluginFormatHeadless::searchPathsForPlugins | ( | const FileSearchPath & | directoriesToSearch,
|  | bool | recursive,
|  | bool | allowPluginsWhichRequireAsynchronousInstantiation )

override 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

  directoriesToSearch | This specifies which directories shall be searched for plug-ins.
  recursive | Should the search recursively traverse folders.
  allowPluginsWhichRequireAsynchronousInstantiation | If this is false then plug-ins which require asynchronous creation will be excluded.

Implements juce::AudioPluginFormat.

## doesPluginStillExist()

bool juce::VSTPluginFormatHeadless::doesPluginStillExist | ( | const PluginDescription & |  | ) |

override 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.

Implements juce::AudioPluginFormat.

## getDefaultLocationsToSearch()

FileSearchPath juce::VSTPluginFormatHeadless::getDefaultLocationsToSearch | ( |  | ) |

override 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.

Implements juce::AudioPluginFormat.

## aboutToScanVSTShellPlugin()

virtual void juce::VSTPluginFormatHeadless::aboutToScanVSTShellPlugin | ( | const PluginDescription & |  | ) |

virtual

Can be overridden to receive a callback when each member of a shell plugin is about to be tested during a call to findAllTypesForFile().

Only the name and uid members of the PluginDescription are guaranteed to be valid when this is called.

References VSTPluginFormatHeadless().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited