mirror of
https://github.com/scummvm/scummvm.git
synced 2025-04-02 10:52:32 -04:00
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. |
||
---|---|---|
.. | ||
dbopl.cpp | ||
dbopl.h | ||
dosbox.cpp | ||
dosbox.h | ||
mame.cpp | ||
mame.h | ||
nuked.cpp | ||
nuked.h |