diff options
author | Johannes Schickel | 2013-05-03 00:58:32 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-07-24 03:28:47 +0200 |
commit | 80ab4c524295ba2cdec3a297919653eda4133ed3 (patch) | |
tree | fa334033800bd44660e7570b58c910fac6a9c1e9 /engines/scumm/sound.cpp | |
parent | e19656464c779558a8bc201cb97b924edcf91ea1 (diff) | |
download | scummvm-rg350-80ab4c524295ba2cdec3a297919653eda4133ed3.tar.gz scummvm-rg350-80ab4c524295ba2cdec3a297919653eda4133ed3.tar.bz2 scummvm-rg350-80ab4c524295ba2cdec3a297919653eda4133ed3.zip |
SCUMM: Implement original AD AdLib output.
This implements the original AD output and enables it for Indy3 and Loom DOS.
It is not enabled for Monkey Island DOS because it would break multi MIDI
support. However, there are also drawbacks for Indy3. In the catacombs
we were able to play sfx (Indy walking around) and the background music
at once. This was not supported in the original player and thus also does
not work with this reimplementation.
This fixes bug #2027877 "INDY3: Non-Looping Sound Effects".
This fixes bug #1159581 "ADLIB: Adlib Emulation doesn't Respect Volume Settings"
for Indy3 and Loom.
Diffstat (limited to 'engines/scumm/sound.cpp')
-rw-r--r-- | engines/scumm/sound.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 3f6290f8fc..5e5e8045b5 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -1930,7 +1930,6 @@ int ScummEngine::readSoundResourceSmallHeader(ResId idx) { // 8 bytes MTrk header // 7 bytes MIDI tempo sysex // + some default instruments - byte *ptr; if (_game.features & GF_OLD_BUNDLE) { ad_size -= 4; _fileHandle->seek(ad_offs + 4, SEEK_SET); @@ -1938,10 +1937,17 @@ int ScummEngine::readSoundResourceSmallHeader(ResId idx) { ad_size -= 6; _fileHandle->seek(ad_offs, SEEK_SET); } - ptr = (byte *) calloc(ad_size, 1); - _fileHandle->read(ptr, ad_size); - convertADResource(_res, _game, idx, ptr, ad_size); - free(ptr); + // For games using AD except Indy3 and Loom we are using our iMuse + // implementation. See output initialization in + // ScummEngine::setupMusic for more information. + if (_game.id != GID_INDY3 && _game.id != GID_LOOM) { + byte *ptr = (byte *)calloc(ad_size, 1); + _fileHandle->read(ptr, ad_size); + convertADResource(_res, _game, idx, ptr, ad_size); + free(ptr); + } else { + _fileHandle->read(_res->createResource(rtSound, idx, ad_size), ad_size); + } return 1; } else if (ro_offs != 0) { _fileHandle->seek(ro_offs - 2, SEEK_SET); |