1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

AudioPluginFormatManager: Add new function to register all default headless formats

This commit is contained in:
reuk 2025-08-20 13:44:33 +01:00
parent dd5ced96c1
commit a5c25b9db0
No known key found for this signature in database
2 changed files with 35 additions and 0 deletions

View file

@ -38,6 +38,29 @@ namespace juce
{ {
//============================================================================== //==============================================================================
void addHeadlessDefaultFormatsToManager ([[maybe_unused]] AudioPluginFormatManager& manager)
{
#if JUCE_INTERNAL_HAS_AU
manager.addFormat (std::make_unique<AudioUnitPluginFormatHeadless>());
#endif
#if JUCE_INTERNAL_HAS_VST
manager.addFormat (std::make_unique<VSTPluginFormatHeadless>());
#endif
#if JUCE_INTERNAL_HAS_VST3
manager.addFormat (std::make_unique<VST3PluginFormatHeadless>());
#endif
#if JUCE_INTERNAL_HAS_LADSPA
manager.addFormat (std::make_unique<LADSPAPluginFormatHeadless>());
#endif
#if JUCE_INTERNAL_HAS_LV2
manager.addFormat (std::make_unique<LV2PluginFormatHeadless>());
#endif
}
void addDefaultFormatsToManager ([[maybe_unused]] AudioPluginFormatManager& manager) void addDefaultFormatsToManager ([[maybe_unused]] AudioPluginFormatManager& manager)
{ {
#if JUCE_INTERNAL_HAS_AU #if JUCE_INTERNAL_HAS_AU

View file

@ -154,6 +154,18 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginFormatManager) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginFormatManager)
}; };
/** Add all standard plugin formats to the AudioPluginFormatManager, *without* UI support.
If you use one of these formats to load a plugin, the resulting plugin will always return
false from hasEditor(), and return nullptr from createEditor().
This function is intended for use in commandline projects that never need to load plugin UIs.
In such cases, build times can be improved by omitting UI code from the project.
This is a cut-down version of the old AudioPluginFormatManager::addDefaultFormats().
*/
void addHeadlessDefaultFormatsToManager (AudioPluginFormatManager&);
/** Add all standard plugin formats to the AudioPluginFormatManager, *with* UI support. /** Add all standard plugin formats to the AudioPluginFormatManager, *with* UI support.
This function replaces AudioPluginFormatManager::addDefaultFormats(). This function replaces AudioPluginFormatManager::addDefaultFormats().