1
0
Fork 0

Gate NoteEvent::VoiceTerminated behind MIDI_INPUT

This commit is contained in:
Robbert van der Helm 2022-07-06 17:11:49 +02:00
parent 95b4d9785e
commit 16077101b2
2 changed files with 6 additions and 3 deletions

View file

@ -1011,12 +1011,14 @@ impl<P: ClapPlugin> Wrapper<P> {
clap_call! { out=>try_push(out, &event.header) }
}
// NOTE: This is gated behind `P::MIDI_INPUT`, because this is a merely a hint event
// for the host. It is not output to any other plugin or device.
NoteEvent::VoiceTerminated {
timing: _,
voice_id,
channel,
note,
} if P::MIDI_OUTPUT >= MidiConfig::Basic => {
} if P::MIDI_INPUT >= MidiConfig::Basic => {
let event = clap_event_note {
header: clap_event_header {
size: mem::size_of::<clap_event_note>() as u32,

View file

@ -1591,9 +1591,10 @@ impl<P: Vst3Plugin> IAudioProcessor for Wrapper<P> {
};
}
// VST3 does not support or need these events, but they should also not
// trigger a debug assertion failure in NIH-plug
// trigger a debug assertion failure in NIH-plug. Also notes how this is
// gated by `P::MIDI_INPUT`.
NoteEvent::VoiceTerminated { .. }
if P::MIDI_OUTPUT >= MidiConfig::Basic =>
if P::MIDI_INPUT >= MidiConfig::Basic =>
{
continue;
}