From 475b19d6090aabeb3a3a845db46258a10c7dc766 Mon Sep 17 00:00:00 2001 From: Hanspeter Portner Date: Sat, 14 Aug 2021 17:35:08 +0200 Subject: [PATCH] dsp: fix 14bit derivation. --- VERSION | 2 +- jit_dsp.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index bbfeb7c..b6689b5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.419 +0.1.421 diff --git a/jit_dsp.c b/jit_dsp.c index eb26ee4..f3ce6dd 100644 --- a/jit_dsp.c +++ b/jit_dsp.c @@ -995,42 +995,42 @@ _handle_midi(plughandle_t *handle, dsp_t *dsp, case LV2_MIDI_CTL_LSB_MAIN_VOLUME: { - handle->gain[chn] &= 0x7f; + handle->gain[chn] &= ~0x7f; handle->gain[chn] |= val; _update_gain(handle, dsp, chn); } break; case LV2_MIDI_CTL_MSB_MAIN_VOLUME: { - handle->gain[chn] &= 0x3f80; + handle->gain[chn] &= ~0x3f80; handle->gain[chn] |= val << 7; _update_gain(handle, dsp, chn); } break; case LV2_MIDI_CTL_SC1_SOUND_VARIATION | 0x20: { - handle->pressure[chn] &= 0x7f; + handle->pressure[chn] &= ~0x7f; handle->pressure[chn] |= val; _update_pressure(handle, dsp, chn); } break; case LV2_MIDI_CTL_SC1_SOUND_VARIATION: { - handle->pressure[chn] &= 0x3f80; + handle->pressure[chn] &= ~0x3f80; handle->pressure[chn] |= val << 7; _update_pressure(handle, dsp, chn); } break; case LV2_MIDI_CTL_SC5_BRIGHTNESS | 0x20: { - handle->timbre[chn] &= 0x7f; + handle->timbre[chn] &= ~0x7f; handle->timbre[chn] |= val; _update_timbre(handle, dsp, chn); } break; case LV2_MIDI_CTL_SC5_BRIGHTNESS: { - handle->timbre[chn] &= 0x3f80; + handle->timbre[chn] &= ~0x3f80; handle->timbre[chn] |= val << 7; _update_timbre(handle, dsp, chn); -- 2.38.5