mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-13 00:04:19 +00:00
Tweaked VST wrapper so that MIDI effect plug-ins work even if the user forgets to define JucePlugin_WantsMidiInput/Output
This commit is contained in:
parent
ef50b8d89f
commit
6f4571b2e5
1 changed files with 5 additions and 5 deletions
|
|
@ -566,13 +566,13 @@ public:
|
|||
host that we want midi. In the SDK this method is marked as deprecated, but
|
||||
some hosts rely on this behaviour.
|
||||
*/
|
||||
if (vstEffect.flags & vstEffectFlagIsSynth || JucePlugin_WantsMidiInput)
|
||||
if (vstEffect.flags & vstEffectFlagIsSynth || JucePlugin_WantsMidiInput || JucePlugin_IsMidiEffect)
|
||||
{
|
||||
if (hostCallback != nullptr)
|
||||
hostCallback (&vstEffect, hostOpcodePlugInWantsMidi, 0, 1, 0, 0);
|
||||
}
|
||||
|
||||
#if JucePlugin_ProducesMidiOutput
|
||||
#if JucePlugin_ProducesMidiOutput || JucePlugin_IsMidiEffect
|
||||
outgoingEvents.ensureSize (512);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1697,7 +1697,7 @@ private:
|
|||
|
||||
pointer_sized_int handlePreAudioProcessingEvents (VstOpCodeArguments args)
|
||||
{
|
||||
#if JucePlugin_WantsMidiInput
|
||||
#if JucePlugin_WantsMidiInput || JucePlugin_IsMidiEffect
|
||||
VSTMidiEventList::addEventsToMidiBuffer ((VstEventBlock*) args.ptr, midiEvents);
|
||||
return 1;
|
||||
#else
|
||||
|
|
@ -1859,7 +1859,7 @@ private:
|
|||
|| strcmp (text, "receiveVstMidiEvent") == 0
|
||||
|| strcmp (text, "receiveVstMidiEvents") == 0)
|
||||
{
|
||||
#if JucePlugin_WantsMidiInput
|
||||
#if JucePlugin_WantsMidiInput || JucePlugin_IsMidiEffect
|
||||
return 1;
|
||||
#else
|
||||
return -1;
|
||||
|
|
@ -1870,7 +1870,7 @@ private:
|
|||
|| strcmp (text, "sendVstMidiEvent") == 0
|
||||
|| strcmp (text, "sendVstMidiEvents") == 0)
|
||||
{
|
||||
#if JucePlugin_ProducesMidiOutput
|
||||
#if JucePlugin_ProducesMidiOutput || JucePlugin_IsMidiEffect
|
||||
return 1;
|
||||
#else
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue