Browse Source

VST2: Use 16 channels of midi in VST2 wrapper

tags/2021-05-28
hogliux 8 years ago
parent
commit
b4d655499b
2 changed files with 24 additions and 1 deletions
  1. +21
    -0
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
  2. +3
    -1
      modules/juce_audio_processors/format_types/juce_VSTInterface.h

+ 21
- 0
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp 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)
};


+ 3
- 1
modules/juce_audio_processors/format_types/juce_VSTInterface.h View File

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


Loading…
Cancel
Save