diff options
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index c7c2a2eb84..ca4bfbb468 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -489,21 +489,23 @@ void Sound::playSound(int soundID) { if ((_scumm->_features & GF_AMIGA) && (_scumm->_version == 3)) { // experimental support for Indy3 Amiga sound effects - if (READ_BE_UINT16(ptr + 26) == 0x00FF) // looped sound - // TODO: support looping sounds - // ptr + 14 seems to be looping duration - flags = 0; - else if (READ_BE_UINT16(ptr + 26) == 0x0001) // nonlooped sound - flags = 0; // - else if (READ_BE_UINT16(ptr + 26) == 0x0101) // background music - // TODO: support music + bool amigatest = (READ_LE_UINT16(ptr + 26) == 0x0001) || (READ_LE_UINT16(ptr + 26) == 0x0001) + || (READ_LE_UINT16(ptr + 26) == 0x00FF); + if (amigatest) { + if (READ_BE_UINT16(ptr + 26) == 0x00FF) // looped sound + // TODO: support looping sounds + // ptr + 14 seems to be looping duration + flags = 0; + else if (READ_BE_UINT16(ptr + 26) == 0x0001) // nonlooped sound + flags = 0; // + else if (READ_BE_UINT16(ptr + 26) == 0x0101) // background music + // TODO: support music + return; + size = READ_BE_UINT16(ptr + 12); + rate = 11000; + _scumm->_mixer->playRaw(NULL, ptr + 28, size, rate, flags, soundID); return; - else - debug(3,"Unknown sound type detected!"); - size = READ_BE_UINT16(ptr + 12); - rate = 11000; - _scumm->_mixer->playRaw(NULL, ptr + 28, size, rate, flags, soundID); - return; + } } if (_scumm->_features & GF_OLD_BUNDLE) { |