Type 1 SMF files consist of multiple tracks that are to be played simultaneously
in parallel. Support for this was previously implemented by merging these tracks
into one single track, then treating the result as a regular type 0 SMF file.
This commit adds full support for type 1 files. The parallel tracks are loaded
as subtracks of the parent track and played simultaneously in real time. This
allows for support of MIDI formats with parallel subtracks that do not use the
SMF format (Dark Seed floppy version) or that jump to offsets within each
parallel subtrack (Origin MIDI).
If running an OPL2 track on a DOS_BOX OPL3 emulator,
The buffer will be divided by 2 like if it is stereo,
but it will generate a mono audio stream, as opl3Active
flag is disabled, so it will act as an OPL2.
The error results in wrong sound produced.
This fix the issue when OPL3 is used as an OPL2 and therefore
as a mono audio source.
The current error should be easily reproducible if
using OPL3 with .ADL Westwood's files.
This bug it might have never been noticed because those files,
in kyra engine, are using always OPL2 (kAdlib) is used.
When DosBox OPL3 Emulator is run as OPL2 compatibilty mode,
requires to call the GenerateBlock2 method as the internal
stereo mode used in GenerateBlock3 is not activated.
This fix covers all scenarios:
- OPL2: default common base case, non stereo.
- DUAL_OPL2: This is kind of OPL3 mode,
I don't think is really fully supported,
- OPL3 in OPL2 mode: In this scenario the audio buffer is stereo, but
the emulator is generating mono audio.
- OPL3 in OPL3 mode: this is the full stereo mode of OPL3.
When configuration flags are changed (ASan enabling for example), force
rebuild the MT32 objects.
They were not rebuild because not depending on config.h
On iOS a sandboxed filesystem is used where the root is in the
Application folder instead of being the filesystem root. As a
result path used in ScummVM (for example for FSNode) are different
from filesystem paths. For fluidsynth the internal soundfont path
is transformed to a filesystem path to pass to the fluidsynth
library. On iOS trying to create a FSNode with that full path does
not work and that caused the soundfont existence check to fail.
It contains defines that should be available from scummsys.h.
Also, it contains defines to support ancient and
now unsupported versions of MSVC (2013 and earlier)