Dusk Audio Framework
Loading...
Searching...
No Matches
Plugin related utilities

Enumerations

enum  SpecialDir {
  kSpecialDirHome , kSpecialDirConfig , kSpecialDirConfigForPlugin , kSpecialDirDocuments ,
  kSpecialDirDocumentsForPlugin
}

Functions

const char * getBinaryFilename ()
const char * getPluginFormatName () noexcept
const char * getSpecialDir (SpecialDir dir)
const char * getResourcePath (const char *bundlePath) noexcept

Detailed Description

Enumeration Type Documentation

◆ SpecialDir

enum SpecialDir

List of supported OS-specific directories to be used for getSpecialDir.

Enumerator
kSpecialDirHome 

The user "home" directory

kSpecialDirConfig 

Directory intended to store persistent configuration data (in general)

kSpecialDirConfigForPlugin 

Directory intended to store persistent configuration data for the current plugin

kSpecialDirDocuments 

Directory intended to store "documents" (in general)

kSpecialDirDocumentsForPlugin 

Directory intended to store "documents" for the current plugin

Function Documentation

◆ getBinaryFilename()

const char * getBinaryFilename ( )

Get the absolute filename of the plugin DSP/UI binary.
Under certain systems or plugin formats the binary will be inside the plugin bundle.
Also, in some formats or setups, the DSP and UI binaries are in different files.

◆ getPluginFormatName()

const char * getPluginFormatName ( )
noexcept

Get a string representation of the current plugin format we are building against.
This can be "AudioUnit", "JACK/Standalone", "LADSPA", "DSSI", "LV2", "VST2", "VST3" or "CLAP".
This string is purely informational and must not be used to tweak plugin behaviour.

Note
DO NOT CHANGE PLUGIN BEHAVIOUR BASED ON PLUGIN FORMAT.

◆ getSpecialDir()

const char * getSpecialDir ( SpecialDir dir)

Get an OS-specific directory.
Calling this function will ensure the dictory exists on the filesystem.
The returned path always includes a final OS separator.

◆ getResourcePath()

const char * getResourcePath ( const char * bundlePath)
noexcept

Get the path to where resources are stored within the plugin bundle.
Requires a valid plugin bundle path.

Returns a path inside the bundle where the plugin is meant to store its resources in.
This path varies between systems and plugin formats, like so:

  • AU: <bundle>/Contents/Resources
  • CLAP+VST2 macOS: <bundle>/Contents/Resources
  • CLAP+VST2 non-macOS: <bundle>/resources (see note)
  • LV2: <bundle>/resources (can be stored anywhere inside the bundle really, DAF just uses this one)
  • VST3: <bundle>/Contents/Resources

The other non-mentioned formats do not support bundles.

Note
For CLAP and VST2 on non-macOS systems, this assumes you have your plugin inside a dedicated directory rather than only shipping with the binary, like so:
+ myplugin.vst/
- myplugin.dll
+ resources/
- image1.png