scummvm/audio/softsynth/opl
Raffaello Bertini 15425aa66b AUDIO: Fix playback in OPL3 mono mode
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.
2025-01-24 22:40:35 +01:00
..
dbopl.cpp JANITORIAL: Fix substract typo in dbopl.cpp 2024-05-18 13:52:31 +02:00
dbopl.h
dosbox.cpp AUDIO: Fix playback in OPL3 mono mode 2025-01-24 22:40:35 +01:00
dosbox.h AUDIO: Remove unused interface for OPL reads 2024-08-11 17:54:01 +03:00
mame.cpp JANITORIAL: Fix typos in general files 2024-12-25 16:57:34 +02:00
mame.h AUDIO: Remove unused interface for OPL reads 2024-08-11 17:54:01 +03:00
nuked.cpp AUDIO: Sync with upstream Nuked OPL. Last commit: cfedb09e 2024-09-09 09:25:43 +03:00
nuked.h AUDIO: Sync with upstream Nuked OPL. Last commit: cfedb09e 2024-09-09 09:25:43 +03:00