scummvm/scummvm — pull request #360 by lordhoto (2013-07-24 01:37:40+00:00)
Title: SCUMM: Implement original AD AdLib output.

This implements the original AD output and enables it for Indy3 and Loom.

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.
It furthermore fixes the door sounds in the games (and probably other sfx too), see http://www.vogons.org/viewtopic.php?t=8644 for some related discussion. (I thought we had some bug report for that too but I cannot find it right now...)

This is not very well tested (the intros of Indy3 and Loom EGA seem to work fine though). Furthermore, there are some unresolved issues and drawbacks (due to original code limitations):

* It currently does not save any data for the currently playing sound resources (the original doesn't do it either as far as I can tell from the disassembly).

* It is not enabled for Monkey Island EGA/VGA because that supports multi MIDI and multi MIDI cannot be supported with this code. The reason here is that multi MIDI supported is built into iMuse and the current code implements its own "MusicEngine" subclass. We could drop multi midi support or find some other way to allow two simultaneous sound outputs (or simply keep using the old conversion code for Monkey Island EGA/VGA)

* Another draw back is that it does not support music and sfx being played at once. This is like in the original games. However, it is noticeable in the catacombs in Indy3 for example. Here, we played the footsteps sound along with the music. That is not working anymore.