aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2005-01-30 20:45:02 +0000
committerPaweł Kołodziejski2005-01-30 20:45:02 +0000
commit292eaa08b0b0f0b9082c61326d89fa1f8c3b382a (patch)
tree52c8cca0046a8fb247f3bb49baaf2ecd581c2abd
parentb9646d35d340627b47accfd1bc0f8c2da784a473 (diff)
downloadscummvm-rg350-292eaa08b0b0f0b9082c61326d89fa1f8c3b382a.tar.gz
scummvm-rg350-292eaa08b0b0f0b9082c61326d89fa1f8c3b382a.tar.bz2
scummvm-rg350-292eaa08b0b0f0b9082c61326d89fa1f8c3b382a.zip
added support for *.map files version 2
svn-id: r16709
-rw-r--r--scumm/imuse_digi/dimuse_sndmgr.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/scumm/imuse_digi/dimuse_sndmgr.cpp b/scumm/imuse_digi/dimuse_sndmgr.cpp
index c19fbcdefc..16d55c5d91 100644
--- a/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -87,10 +87,13 @@ void ImuseDigiSndMgr::prepareSoundFromRMAP(File *file, soundStruct *sound, int32
file->seek(offset, SEEK_SET);
uint32 tag = file->readUint32BE();
assert(tag == 'RMAP');
- assert(file->readUint32BE() == 1); // version
- sound->bits = 16;
- sound->freq = 22050;
- sound->channels = 2;
+ int32 version = file->readUint32BE();
+ if (version != 2) {
+ error("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version number, expected 2, but it's: %d.", version);
+ }
+ sound->bits = file->readUint32BE();
+ sound->freq = file->readUint32BE();
+ sound->channels = file->readUint32BE();
sound->numRegions = file->readUint32BE();
sound->numJumps = file->readUint32BE();
sound->numSyncs = file->readUint32BE();
@@ -595,8 +598,6 @@ int32 ImuseDigiSndMgr::getDataFromRegion(soundStruct *soundHandle, int region, b
soundHandle->compressedStream = makeMP3Stream(cmpFile, len);
#endif
assert(soundHandle->compressedStream);
- assert(soundHandle->compressedStream->getRate() == 22050);
- assert(soundHandle->compressedStream->isStereo());
}
strcpy(soundHandle->lastFileName, fileName);
}