mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
PluginHostType: Automatically set jucePlugInClientCurrentWrapperType during createPluginFilterOfType
This commit is contained in:
parent
84d4c8794a
commit
403ba3007f
9 changed files with 3 additions and 30 deletions
|
|
@ -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<AudioProcessor> plugin (createPluginFilterOfType (AudioProcessor::wrapperType_AAX));
|
||||
auto numInputBuses = plugin->getBusCount (true);
|
||||
auto numOutputBuses = plugin->getBusCount (false);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<AUAudioUnitFactory>* p)
|
||||
: myself (p)
|
||||
{
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AudioUnitv3;
|
||||
initialiseJuce_GUI();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ public:
|
|||
|
||||
static std::unique_ptr<AudioProcessor> createProcessorInstance()
|
||||
{
|
||||
std::unique_ptr<AudioProcessor> 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;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ class StandaloneFilterApp : public JUCEApplication
|
|||
public:
|
||||
StandaloneFilterApp()
|
||||
{
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_Standalone;
|
||||
|
||||
PropertiesFile::Options options;
|
||||
|
||||
options.applicationName = getApplicationName();
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue