aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth
diff options
context:
space:
mode:
authorVincent Bénony2016-01-06 16:20:23 +0100
committerVincent Bénony2016-01-06 16:20:23 +0100
commitefdb5679ce6304dbc854afbbc511e633d7513338 (patch)
treee680a240e5f6018fc3a4cce53b50060caa22a929 /audio/softsynth
parent4687ff6d6d2863cc95c8137543ecf9c39bc01723 (diff)
parentb72c02bad44749a1355acefdb198e36b2e772575 (diff)
downloadscummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.tar.gz
scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.tar.bz2
scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.zip
IOS: Merge branch 'master' into ios-fix
Diffstat (limited to 'audio/softsynth')
-rw-r--r--audio/softsynth/mt32.cpp4
-rw-r--r--audio/softsynth/mt32/ROMInfo.cpp11
2 files changed, 12 insertions, 3 deletions
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index b9799db618..4420657854 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -199,10 +199,10 @@ int MidiDriver_MT32::open() {
_initializing = true;
debug(4, _s("Initializing MT-32 Emulator"));
_controlFile = new Common::File();
- if (!_controlFile->open("MT32_CONTROL.ROM") && !_controlFile->open("CM32L_CONTROL.ROM"))
+ if (!_controlFile->open("CM32L_CONTROL.ROM") && !_controlFile->open("MT32_CONTROL.ROM"))
error("Error opening MT32_CONTROL.ROM / CM32L_CONTROL.ROM");
_pcmFile = new Common::File();
- if (!_pcmFile->open("MT32_PCM.ROM") && !_pcmFile->open("CM32L_PCM.ROM"))
+ if (!_pcmFile->open("CM32L_PCM.ROM") && !_pcmFile->open("MT32_PCM.ROM"))
error("Error opening MT32_PCM.ROM / CM32L_PCM.ROM");
_controlROM = MT32Emu::ROMImage::makeROMImage(_controlFile);
_pcmROM = MT32Emu::ROMImage::makeROMImage(_pcmFile);
diff --git a/audio/softsynth/mt32/ROMInfo.cpp b/audio/softsynth/mt32/ROMInfo.cpp
index 7c0127078b..f6817c1a4d 100644
--- a/audio/softsynth/mt32/ROMInfo.cpp
+++ b/audio/softsynth/mt32/ROMInfo.cpp
@@ -54,12 +54,21 @@ static const ROMInfo *getKnownROMInfoFromList(unsigned int index) {
const ROMInfo* ROMInfo::getROMInfo(Common::File *file) {
size_t fileSize = file->size();
+ Common::String fileName = file->getName();
+ fileName.toUppercase();
+ bool isCM32LROM = fileName.hasPrefix("CM32L_");
// We haven't added the SHA1 checksum code in ScummVM, as the file size
- // suffices for our needs for now.
+ // and ROM name suffices for our needs for now.
//const char *fileDigest = file->getSHA1();
for (int i = 0; getKnownROMInfoFromList(i) != NULL; i++) {
const ROMInfo *romInfo = getKnownROMInfoFromList(i);
if (fileSize == romInfo->fileSize /*&& !strcmp(fileDigest, romInfo->sha1Digest)*/) {
+ if (fileSize == 65536) {
+ // If we are looking for a CM-32L ROM, make sure we return the first matching
+ // CM-32L ROM from the list, instead of the first matching MT-32 ROM
+ if (isCM32LROM && romInfo->controlROMFeatures->isDefaultReverbMT32Compatible())
+ continue;
+ }
return romInfo;
}
}