aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-06-22 03:35:06 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-06-22 03:35:06 +0300
commit8075701abfe8e5b1fc6705eb2b1d35b407784c82 (patch)
tree4b228301c5aedafb4eee3f6f06c8242d2e77746f
parentb2259a0ad2da07729eb285eda4a833e5b0f1f7eb (diff)
downloadlibADLMIDI-8075701abfe8e5b1fc6705eb2b1d35b407784c82.tar.gz
libADLMIDI-8075701abfe8e5b1fc6705eb2b1d35b407784c82.tar.bz2
libADLMIDI-8075701abfe8e5b1fc6705eb2b1d35b407784c82.zip
Portamento must use previously played note in a channel like S-YXG50 does
-rw-r--r--src/adlmidi_midiplay.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index ba5b1ef..089fd43 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -478,7 +478,8 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity)
midiChan.portamentoEnable && currentPortamentoRate != HUGE_VAL &&
!isPercussion && !isXgPercussion;
// Record the last note on MIDI channel as source of portamento
- midiChan.portamentoSource = portamentoEnable ? (int8_t)note : (int8_t)-1;
+ midiChan.portamentoSource = static_cast<int8_t>(note);
+ // midiChan.portamentoSource = portamentoEnable ? (int8_t)note : (int8_t)-1;
// Enable gliding on portamento note
if (portamentoEnable && currentPortamentoSource >= 0)