mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
AudioPluginFormatManager: Move addDefaultFormatsToManager() to new file
This commit is contained in:
parent
a5c25b9db0
commit
718d2151ed
6 changed files with 109 additions and 29 deletions
|
|
@ -61,29 +61,6 @@ void addHeadlessDefaultFormatsToManager ([[maybe_unused]] AudioPluginFormatManag
|
|||
#endif
|
||||
}
|
||||
|
||||
void addDefaultFormatsToManager ([[maybe_unused]] AudioPluginFormatManager& manager)
|
||||
{
|
||||
#if JUCE_INTERNAL_HAS_AU
|
||||
manager.addFormat (std::make_unique<AudioUnitPluginFormat>());
|
||||
#endif
|
||||
|
||||
#if JUCE_INTERNAL_HAS_VST
|
||||
manager.addFormat (std::make_unique<VSTPluginFormat>());
|
||||
#endif
|
||||
|
||||
#if JUCE_INTERNAL_HAS_VST3
|
||||
manager.addFormat (std::make_unique<VST3PluginFormat>());
|
||||
#endif
|
||||
|
||||
#if JUCE_INTERNAL_HAS_LADSPA
|
||||
manager.addFormat (std::make_unique<LADSPAPluginFormat>());
|
||||
#endif
|
||||
|
||||
#if JUCE_INTERNAL_HAS_LV2
|
||||
manager.addFormat (std::make_unique<LV2PluginFormat>());
|
||||
#endif
|
||||
}
|
||||
|
||||
int AudioPluginFormatManager::getNumFormats() const { return formats.size(); }
|
||||
AudioPluginFormat* AudioPluginFormatManager::getFormat (int index) const { return formats[index]; }
|
||||
|
||||
|
|
|
|||
|
|
@ -166,10 +166,4 @@ private:
|
|||
*/
|
||||
void addHeadlessDefaultFormatsToManager (AudioPluginFormatManager&);
|
||||
|
||||
/** Add all standard plugin formats to the AudioPluginFormatManager, *with* UI support.
|
||||
|
||||
This function replaces AudioPluginFormatManager::addDefaultFormats().
|
||||
*/
|
||||
void addDefaultFormatsToManager (AudioPluginFormatManager&);
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE framework.
|
||||
Copyright (c) Raw Material Software Limited
|
||||
|
||||
JUCE is an open source framework subject to commercial or open source
|
||||
licensing.
|
||||
|
||||
By downloading, installing, or using the JUCE framework, or combining the
|
||||
JUCE framework with any other source code, object code, content or any other
|
||||
copyrightable work, you agree to the terms of the JUCE End User Licence
|
||||
Agreement, and all incorporated terms including the JUCE Privacy Policy and
|
||||
the JUCE Website Terms of Service, as applicable, which will bind you. If you
|
||||
do not agree to the terms of these agreements, we will not license the JUCE
|
||||
framework to you, and you must discontinue the installation or download
|
||||
process and cease use of the JUCE framework.
|
||||
|
||||
JUCE End User Licence Agreement: https://juce.com/legal/juce-8-licence/
|
||||
JUCE Privacy Policy: https://juce.com/juce-privacy-policy
|
||||
JUCE Website Terms of Service: https://juce.com/juce-website-terms-of-service/
|
||||
|
||||
Or:
|
||||
|
||||
You may also use this code under the terms of the AGPLv3:
|
||||
https://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
|
||||
THE JUCE FRAMEWORK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL
|
||||
WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING WARRANTY OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include <juce_audio_processors_headless/format/juce_PluginFormatDefs.h>
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
void addDefaultFormatsToManager ([[maybe_unused]] AudioPluginFormatManager& manager)
|
||||
{
|
||||
#if JUCE_INTERNAL_HAS_AU
|
||||
manager.addFormat (std::make_unique<AudioUnitPluginFormat>());
|
||||
#endif
|
||||
|
||||
#if JUCE_INTERNAL_HAS_VST
|
||||
manager.addFormat (std::make_unique<VSTPluginFormat>());
|
||||
#endif
|
||||
|
||||
#if JUCE_INTERNAL_HAS_VST3
|
||||
manager.addFormat (std::make_unique<VST3PluginFormat>());
|
||||
#endif
|
||||
|
||||
#if JUCE_INTERNAL_HAS_LADSPA
|
||||
manager.addFormat (std::make_unique<LADSPAPluginFormat>());
|
||||
#endif
|
||||
|
||||
#if JUCE_INTERNAL_HAS_LV2
|
||||
manager.addFormat (std::make_unique<LV2PluginFormat>());
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace juce
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE framework.
|
||||
Copyright (c) Raw Material Software Limited
|
||||
|
||||
JUCE is an open source framework subject to commercial or open source
|
||||
licensing.
|
||||
|
||||
By downloading, installing, or using the JUCE framework, or combining the
|
||||
JUCE framework with any other source code, object code, content or any other
|
||||
copyrightable work, you agree to the terms of the JUCE End User Licence
|
||||
Agreement, and all incorporated terms including the JUCE Privacy Policy and
|
||||
the JUCE Website Terms of Service, as applicable, which will bind you. If you
|
||||
do not agree to the terms of these agreements, we will not license the JUCE
|
||||
framework to you, and you must discontinue the installation or download
|
||||
process and cease use of the JUCE framework.
|
||||
|
||||
JUCE End User Licence Agreement: https://juce.com/legal/juce-8-licence/
|
||||
JUCE Privacy Policy: https://juce.com/juce-privacy-policy
|
||||
JUCE Website Terms of Service: https://juce.com/juce-website-terms-of-service/
|
||||
|
||||
Or:
|
||||
|
||||
You may also use this code under the terms of the AGPLv3:
|
||||
https://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
|
||||
THE JUCE FRAMEWORK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL
|
||||
WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING WARRANTY OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
/** Add all standard plugin formats to the AudioPluginFormatManager, *with* UI support.
|
||||
|
||||
This function replaces AudioPluginFormatManager::addDefaultFormats().
|
||||
*/
|
||||
void addDefaultFormatsToManager (AudioPluginFormatManager&);
|
||||
|
||||
} // namespace juce
|
||||
|
|
@ -167,6 +167,7 @@ private:
|
|||
} // namespace juce
|
||||
|
||||
#include "format/juce_AudioPluginFormatManager.cpp"
|
||||
#include "format/juce_AudioPluginFormatManagerHelpers.cpp"
|
||||
#include "processors/juce_AudioProcessorEditor.cpp"
|
||||
#include "processors/juce_GenericAudioProcessorEditor.cpp"
|
||||
#include "format_types/juce_VSTPluginFormat.cpp"
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@
|
|||
#include "processors/juce_AudioProcessorEditor.h"
|
||||
#include "processors/juce_GenericAudioProcessorEditor.h"
|
||||
#include "format/juce_AudioPluginFormatManager.h"
|
||||
#include "format/juce_AudioPluginFormatManagerHelpers.h"
|
||||
#include "scanning/juce_KnownPluginList.h"
|
||||
#include "format_types/juce_AudioUnitPluginFormat.h"
|
||||
#include "format_types/juce_LADSPAPluginFormat.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue