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 688c172d46..e05d4b947f 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -210,6 +210,21 @@ juce_ImplementSingleton (SharedMessageThread) static Array activePlugins; +//============================================================================== +// Ableton Live host specific commands +struct AbletonLiveHostSpecific +{ + enum + { + KCantBeSuspended = (1 << 2) + }; + + uint32 magic; // 'AbLi' + int cmd; // 5 = realtime properties + size_t commandSize; // sizeof (int) + int flags; // KCantBeSuspended = (1 << 2) +}; + //============================================================================== /** This is an AudioEffectX object that holds and wraps our AudioProcessor... @@ -578,6 +593,18 @@ public: hostCallback (&vstEffect, hostOpcodePlugInWantsMidi, 0, 1, 0, 0); } + if (getHostType().isAbletonLive() && filter->getTailLengthSeconds() == DBL_MAX && hostCallback != nullptr) + { + AbletonLiveHostSpecific hostCmd; + + hostCmd.magic = 'AbLi'; + hostCmd.cmd = 5; + hostCmd.commandSize = sizeof (int); + hostCmd.flags = AbletonLiveHostSpecific::KCantBeSuspended; + + hostCallback (&vstEffect, hostOpcodeManufacturerSpecific, 0, 0, &hostCmd, 0.0f); + } + #if JucePlugin_ProducesMidiOutput || JucePlugin_IsMidiEffect outgoingEvents.ensureSize (512); #endif