Skip to content

Commit 51c4a48

Browse files
committed
juce_audio_processors: Exclusively use JUCE_INTERNAL_HAS_* macros in place of JUCE_PLUGINHOST_* macros
This change also moves the PLUGINHOST config flags to the juce_audio_processors_headless module header, as this is now the lowest-level module that uses these flags. This change shouldn't require any Projucer/CMake changes.
1 parent 6c627b7 commit 51c4a48

40 files changed

+140
-145
lines changed

examples/Plugins/HostPluginDemo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
juce_audio_processors_headless
4141
exporters: xcode_mac, vs2022, vs2026, linux_make
4242
43-
moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1
44-
JUCE_PLUGINHOST_LV2=1
45-
JUCE_PLUGINHOST_VST3=1
46-
JUCE_PLUGINHOST_VST=0
43+
moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1,
44+
JUCE_PLUGINHOST_LV2=1,
45+
JUCE_PLUGINHOST_VST3=1,
46+
JUCE_PLUGINHOST_VST=0,
4747
JUCE_PLUGINHOST_AU=1
4848
4949
type: AudioProcessor

extras/Projucer/Source/Project/jucer_Project.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,22 +2320,22 @@ int Project::getARATransformationFlags() const noexcept
23202320
//==============================================================================
23212321
bool Project::isAUPluginHost() const
23222322
{
2323-
return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_AU", false);
2323+
return getEnabledModules().isModuleEnabled ("juce_audio_processors_headless") && isConfigFlagEnabled ("JUCE_PLUGINHOST_AU", false);
23242324
}
23252325

23262326
bool Project::isVSTPluginHost() const
23272327
{
2328-
return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false);
2328+
return getEnabledModules().isModuleEnabled ("juce_audio_processors_headless") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false);
23292329
}
23302330

23312331
bool Project::isVST3PluginHost() const
23322332
{
2333-
return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false);
2333+
return getEnabledModules().isModuleEnabled ("juce_audio_processors_headless") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false);
23342334
}
23352335

23362336
bool Project::isLV2PluginHost() const
23372337
{
2338-
return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_LV2", false);
2338+
return getEnabledModules().isModuleEnabled ("juce_audio_processors_headless") && isConfigFlagEnabled ("JUCE_PLUGINHOST_LV2", false);
23392339
}
23402340

23412341
bool Project::isARAPluginHost() const

modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
JUCE_BEGIN_NO_SANITIZE ("vptr")
4242

43-
#if JUCE_PLUGINHOST_VST3
43+
#if JUCE_INTERNAL_HAS_VST3
4444
#if JUCE_MAC
4545
#include <CoreFoundation/CoreFoundation.h>
4646
#endif

modules/juce_audio_processors/format/juce_AudioPluginFormatManagerHelpers.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
==============================================================================
3333
*/
3434

35-
#include <juce_audio_processors_headless/format/juce_PluginFormatDefs.h>
36-
3735
namespace juce
3836
{
3937

modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
namespace juce
3636
{
3737

38-
#if (JUCE_PLUGINHOST_AU && (JUCE_MAC || JUCE_IOS)) || DOXYGEN
38+
#if JUCE_INTERNAL_HAS_AU || DOXYGEN
3939

4040
//==============================================================================
4141
/**

modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
==============================================================================
3333
*/
3434

35-
#if JUCE_PLUGINHOST_AU && (JUCE_MAC || JUCE_IOS)
35+
#if JUCE_INTERNAL_HAS_AU
3636

3737
#include <juce_audio_processors_headless/format_types/juce_AudioUnitPluginFormatImpl.h>
3838

modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
namespace juce
3636
{
3737

38-
#if (JUCE_PLUGINHOST_LADSPA && (JUCE_LINUX || JUCE_BSD)) || DOXYGEN
38+
#if JUCE_INTERNAL_HAS_LADSPA || DOXYGEN
3939

4040
//==============================================================================
4141
/** Provided for backwards compatibility; LADSPA plugins are always headless.

modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
==============================================================================
3333
*/
3434

35-
#if JUCE_PLUGINHOST_LV2 && (! (JUCE_ANDROID || JUCE_IOS))
35+
#if JUCE_INTERNAL_HAS_LV2
3636

3737
#include <juce_audio_processors_headless/format_types/juce_LV2PluginFormatImpl.h>
3838
#include <juce_gui_extra/native/juce_NSViewFrameWatcher_mac.h>

modules/juce_audio_processors/format_types/juce_LV2PluginFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
namespace juce
3636
{
3737

38-
#if (JUCE_PLUGINHOST_LV2 && (! (JUCE_ANDROID || JUCE_IOS))) || DOXYGEN
38+
#if JUCE_INTERNAL_HAS_LV2 || DOXYGEN
3939

4040
/**
4141
Implements a plugin format for LV2 plugins.

modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
==============================================================================
3333
*/
3434

35-
#if JUCE_PLUGINHOST_VST3 && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX || JUCE_BSD)
35+
#if JUCE_INTERNAL_HAS_VST3
3636

3737
#include <juce_audio_processors_headless/format_types/juce_VST3PluginFormatImpl.h>
3838
#include <juce_audio_processors/utilities/juce_NSViewComponentWithParent.h>
@@ -646,4 +646,4 @@ JUCE_END_NO_SANITIZE
646646

647647
} // namespace juce
648648

649-
#endif // JUCE_PLUGINHOST_VST3
649+
#endif

0 commit comments

Comments
 (0)