aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/mt32/Part.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-02-27 12:32:06 +0100
committerWillem Jan Palenstijn2017-02-28 18:40:04 +0100
commit867511d2d0a5d063e37b07115b8b98f5930d415b (patch)
tree2fd96da5f26b8320b8c3524a2acb20f37c59e61c /audio/softsynth/mt32/Part.cpp
parente2a72393d298a5c338e55b73ae910c9ef4e1b45e (diff)
downloadscummvm-rg350-867511d2d0a5d063e37b07115b8b98f5930d415b.tar.gz
scummvm-rg350-867511d2d0a5d063e37b07115b8b98f5930d415b.tar.bz2
scummvm-rg350-867511d2d0a5d063e37b07115b8b98f5930d415b.zip
MT32: Update Munt to 2.0.3
This update uses upstream commit 777c51cdb4dbb4e02a53c23edea9086f0b600e26. The new SampleRateConverter is added, but not built as we don't use it. Also, building it without source changes will need additional include directories. This update of Munt reduces the stack size, and thus fixes bug #9630.
Diffstat (limited to 'audio/softsynth/mt32/Part.cpp')
-rwxr-xr-xaudio/softsynth/mt32/Part.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp
index c4d5b94551..9b5119ee8b 100755
--- a/audio/softsynth/mt32/Part.cpp
+++ b/audio/softsynth/mt32/Part.cpp
@@ -376,7 +376,8 @@ void RhythmPart::noteOn(unsigned int midiKey, unsigned int velocity) {
unsigned int key = midiKey;
unsigned int drumNum = key - 24;
int drumTimbreNum = rhythmTemp[drumNum].timbre;
- if (drumTimbreNum >= 127) { // 94 on MT-32
+ const int drumTimbreCount = 64 + synth->controlROMMap->timbreRCount; // 94 on MT-32, 128 on LAPC-I/CM32-L
+ if (drumTimbreNum == 127 || drumTimbreNum >= drumTimbreCount) { // timbre #127 is OFF, no sense to play it
synth->printDebug("%s: Attempted to play unmapped key %d (velocity %d)", name, midiKey, velocity);
return;
}