1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Disabled Ableton Live's plug-in auto-suspend if the plug-in reports an infinite tail-time

This commit is contained in:
hogliux 2016-12-04 12:31:23 +00:00
parent 8e768fc083
commit a816a44686

View file

@ -210,6 +210,21 @@ juce_ImplementSingleton (SharedMessageThread)
static Array<void*> 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