1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-05 03:50:07 +00:00

VST2: Use 16 channels of midi in VST2 wrapper

This commit is contained in:
hogliux 2017-05-10 16:10:12 +01:00
parent f0a1b0b5e6
commit b4d655499b
2 changed files with 24 additions and 1 deletions

View file

@ -1171,6 +1171,8 @@ public:
case plugInOpcodeGetSpeakerArrangement: return handleGetSpeakerConfiguration (args);
case plugInOpcodeSetNumberOfSamplesToProcess: return handleSetNumberOfSamplesToProcess (args);
case plugInOpcodeSetSampleFloatType: return handleSetSampleFloatType (args);
case pluginOpcodeGetNumMidiInputChannels: return handleGetNumMidiInputChannels();
case pluginOpcodeGetNumMidiOutputChannels: return handleGetNumMidiOutputChannels();
default: return 0;
}
}
@ -2010,6 +2012,25 @@ private:
return 0;
}
//==============================================================================
pointer_sized_int handleGetNumMidiInputChannels()
{
#if JucePlugin_WantsMidiInput || JucePlugin_IsMidiEffect
return 16;
#else
return 0;
#endif
}
pointer_sized_int handleGetNumMidiOutputChannels()
{
#if JucePlugin_ProducesMidiOutput || JucePlugin_IsMidiEffect
return 16;
#else
return 0;
#endif
}
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceVSTWrapper)
};

View file

@ -143,7 +143,9 @@ enum VstHostToPlugInOpcodes
plugInOpcodeStopProcess,
plugInOpcodeSetNumberOfSamplesToProcess,
plugInOpcodeSetSampleFloatType = plugInOpcodeSetNumberOfSamplesToProcess + 4,
plugInOpcodeMaximum = plugInOpcodeSetSampleFloatType
pluginOpcodeGetNumMidiInputChannels,
pluginOpcodeGetNumMidiOutputChannels,
plugInOpcodeMaximum = pluginOpcodeGetNumMidiOutputChannels
};