This adds emulation for the dual OPL2 FM synthesis chip configuration to the
supported hardware OPL3 options: RetroWave OPL3 and OPL3LPT. This enables
stereo AdLib playback for SCI (and possibly other engines) on these devices.
This was already implemented for the OPL3 emulators (Dosbox and Nuked) and
ALSA. Generic code has been added to the OPL class to add similar emulation
for the other OPL3 options; this can also be easily added to any future OPL3
hardware or emulators which do not already have dual OPL2 support.
Fixes segfault when logging that an OPL driver doesn't support the
emulation type requested by a game.
The code used driver id as an array index, but this is incorrect
because array indexes depends on which drivers are compiled in.
This issue was identified and fixed in 2015, but this line was missed:
6f01600e12
Fixes the crash in bug #14413
- Add support for sustain controller
- Correct MT-540 <> CT-460/CSM-1 instrument remapping
- Simplify volume control (Casio devices do not support note velocity)
CMS/Gameblaster: add sbtype=gb, fix base addresses other than 220h, fix lack of sound when starting from autoexec, add autodetection (Thanks robertmo and Cloudschatze)
As a safety check...
Also throw out some warnings when loading savegames
with instrument data for a different device (the savegame
incompatibility would be very nice to be fixed, but it is not
trivial.
Currently, Roland MT-32 sound is broken for
SAMNMAX. Just try the intro song with shut off
speech. It is very obvious that it plays with a quite
reduced number of channels compared to the
original interpreter.
Now, due to the not-so-helpful code design (much
of the iMuse code has been drawn into the common
code) it has become increasingly difficult to fix Midi
related thing in iMuse. I have added more and more
crude hacks over time.
SAMNMAX requires more elaborate channel
allocation. To make it happen I have added driver
wrappers for Midi to the iMuse code.
Other than that, I have done only minor cleanup here.
Actually, I would have liked to withdraw much more
of the iMuse code from the common code and move
it to SCUMM (basically all the MidiChannel
stuff which is exclusively used by iMuse. But it turns
out that it is so thoroughly intertwined (the major
blocker here being the AdLib driver) that it requires
more thought and effort and would just distract me
from fixing the SAMNMAX sound.
This will actually read out of bounds in the orginal interpreter, too. I have fixed it to be more in line with the original (the value in question is always treated as unsigned here), but still not do anything harmful.
This was previously disabled implicitly by the missing define
symbols in the SampleRateConvertor module. This has now been enabled
to use the internal rate convertor code.
This was generating undefined macro warnings from GCC when -Wundef
was passed.
Reduce abuse of the property function to set init vars.
Better distinction between drivers to prevent a GM init on
the Mac driver (which could happen depending on the
launcher sound setting).