diff --git a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp index 7736fbf98b..2076fa2675 100644 --- a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp @@ -747,8 +747,6 @@ namespace AAXClasses static AAX_CEffectParameters* AAX_CALLBACK Create() { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AAX; - if (PluginHostType::jucePlugInIsRunningInAudioSuiteFn == nullptr) { PluginHostType::jucePlugInIsRunningInAudioSuiteFn = [] (AudioProcessor& processor) @@ -2485,7 +2483,6 @@ namespace AAXClasses static void getPlugInDescription (AAX_IEffectDescriptor& descriptor, [[maybe_unused]] const AAX_IFeatureInfo* featureInfo) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AAX; std::unique_ptr plugin (createPluginFilterOfType (AudioProcessor::wrapperType_AAX)); auto numInputBuses = plugin->getBusCount (true); auto numOutputBuses = plugin->getBusCount (false); diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index 9ca1f91030..f994a32ac1 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -2421,7 +2421,6 @@ AUSDK_COMPONENT_ENTRY (FACTORY_BASE_CLASS, JuceAU) extern "C" void* JUCE_AU_ENTRY_POINT_NAME (const AudioComponentDescription* inDesc); AUSDK_EXPORT extern "C" void* JUCE_AU_ENTRY_POINT_NAME (const AudioComponentDescription* inDesc) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AudioUnit; return JuceAUFactory (inDesc); } diff --git a/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm index 3e13ede1ad..cf7a4b8408 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm @@ -927,7 +927,6 @@ private: static JuceAudioUnitv3* create (AUAudioUnit* audioUnit, AudioComponentDescription descr, AudioComponentInstantiationOptions options, NSError** error) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AudioUnitv3; return new JuceAudioUnitv3 (audioUnit, descr, options, error); } @@ -1731,7 +1730,6 @@ public: JuceAUViewController (AUViewController* p) : myself (p) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AudioUnitv3; initialiseJuce_GUI(); } diff --git a/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp b/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp index a3f221c4e4..1e80aab3a3 100644 --- a/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp +++ b/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp @@ -721,7 +721,7 @@ public: static std::unique_ptr createProcessorInstance() { - std::unique_ptr result { createPluginFilterOfType (AudioProcessor::wrapperType_LV2) }; + auto result = rawToUniquePtr (createPluginFilterOfType (AudioProcessor::wrapperType_LV2)); #if defined (JucePlugin_PreferredChannelConfigurations) constexpr short channelConfigurations[][2] { JucePlugin_PreferredChannelConfigurations }; @@ -1356,8 +1356,6 @@ private: //============================================================================== LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor (uint32_t index) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_LV2; - if (index != 0) return nullptr; diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp index 009707ec6b..1f13a1d8a9 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp @@ -50,8 +50,6 @@ class StandaloneFilterApp : public JUCEApplication public: StandaloneFilterApp() { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_Standalone; - PropertiesFile::Options options; options.applicationName = getApplicationName(); diff --git a/modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp b/modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp index 5d7d3768c0..8609e57df5 100644 --- a/modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp @@ -671,11 +671,7 @@ UNITY_INTERFACE_EXPORT int UNITY_INTERFACE_API UnityGetAudioEffectDefinitions (U juce::initialiseJuce_GUI(); static std::once_flag flag; - std::call_once (flag, [] - { - juce::PluginHostType::jucePlugInClientCurrentWrapperType = juce::AudioProcessor::wrapperType_Unity; - juce::juce_createUnityPeerFn = juce::createUnityPeer; - }); + std::call_once (flag, [] { juce::juce_createUnityPeerFn = juce::createUnityPeer; }); static auto definition = juce::getEffectDefinition(); static UnityAudioEffectDefinition* definitions[] { &definition }; diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 5988ef6325..88cbaf6ac5 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -2193,8 +2193,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") JUCE_EXPORTED_FUNCTION Vst2::AEffect* VSTPluginMain (Vst2::audioMasterCallback audioMaster); JUCE_EXPORTED_FUNCTION Vst2::AEffect* VSTPluginMain (Vst2::audioMasterCallback audioMaster) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; - initialiseMacVST(); return pluginEntryPoint (audioMaster); } @@ -2202,8 +2200,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") JUCE_EXPORTED_FUNCTION Vst2::AEffect* main_macho (Vst2::audioMasterCallback audioMaster); JUCE_EXPORTED_FUNCTION Vst2::AEffect* main_macho (Vst2::audioMasterCallback audioMaster) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; - initialiseMacVST(); return pluginEntryPoint (audioMaster); } @@ -2215,16 +2211,12 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") JUCE_EXPORTED_FUNCTION Vst2::AEffect* VSTPluginMain (Vst2::audioMasterCallback audioMaster); JUCE_EXPORTED_FUNCTION Vst2::AEffect* VSTPluginMain (Vst2::audioMasterCallback audioMaster) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; - return pluginEntryPoint (audioMaster); } JUCE_EXPORTED_FUNCTION Vst2::AEffect* main_plugin (Vst2::audioMasterCallback audioMaster) asm ("main"); JUCE_EXPORTED_FUNCTION Vst2::AEffect* main_plugin (Vst2::audioMasterCallback audioMaster) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; - return VSTPluginMain (audioMaster); } @@ -2238,16 +2230,12 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") extern "C" __declspec (dllexport) Vst2::AEffect* VSTPluginMain (Vst2::audioMasterCallback audioMaster) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; - return pluginEntryPoint (audioMaster); } #if ! defined (JUCE_64BIT) && JUCE_MSVC // (can't compile this on win64, but it's not needed anyway with VST2.4) extern "C" __declspec (dllexport) int main (Vst2::audioMasterCallback audioMaster) { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; - return (int) pluginEntryPoint (audioMaster); } #endif diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 04fce34f58..334b1ca782 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -4168,8 +4168,6 @@ using namespace juce; // The VST3 plugin entry point. extern "C" SMTG_EXPORT_SYMBOL IPluginFactory* PLUGIN_API GetPluginFactory() { - PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST3; - #if (JUCE_MSVC || (JUCE_WINDOWS && JUCE_CLANG)) && JUCE_32BIT // Cunning trick to force this function to be exported. Life's too short to // faff around creating .def files for this kind of thing. diff --git a/modules/juce_audio_plugin_client/utility/juce_CreatePluginFilter.h b/modules/juce_audio_plugin_client/utility/juce_CreatePluginFilter.h index a5b7a1f5fe..90b8b70231 100644 --- a/modules/juce_audio_plugin_client/utility/juce_CreatePluginFilter.h +++ b/modules/juce_audio_plugin_client/utility/juce_CreatePluginFilter.h @@ -30,6 +30,7 @@ namespace juce inline AudioProcessor* JUCE_API JUCE_CALLTYPE createPluginFilterOfType (AudioProcessor::WrapperType type) { + PluginHostType::jucePlugInClientCurrentWrapperType = type; AudioProcessor::setTypeOfNextNewPlugin (type); AudioProcessor* const pluginInstance = ::createPluginFilter(); AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined);