This commit fixes an issue where RateConverter would
sometimes chop off the very end of an audio stream. This
happened when the RateConverter would have some
data left in its internal buffer, but the source stream was
already fully read. The base RateConverter class now has
a needsDraining() function which indicates leftover data,
and relevant code now uses it when needed.
The RateConverter class has been modified to allow for
variable input and output rates. The optimized code paths
for copy/simple conversions are retained, but have been moved
inside separate functions instead of subclasses. The templatization
of the stereo parameters has been maintained, and is implemented
via the newly-added RateConverter_Impl template class.
Internal variables have been renamed to be more readable. The
flow() function has been renamed to convert(). The drain()
function has been removed, since it was never implemented
or used anywhere.
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:
6f01600e12ba14acde8a6557716783861dc014d1
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)