Commit Graph
16 Commits
Author SHA1 Message Date
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
Cameron Cawley 5f70129eab AUDIO: Remove unused interface for OPL reads 2024-08-11 17:54:01 +03:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh af529f568b AUDIO: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 13:41:02 +02:00
Vladimir Menshakov 201d2675ad AUDIO: Replace memsets on structures with ctors with ARRAYCLEAR() 2020-08-31 21:57:14 +01:00
D G Turner 28287d70b6 AUDIO: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-17 08:20:01 +00:00
Matthew Hoops bed9da8b9d AUDIO: Remove all AudioStream access to OPL 2015-07-07 20:19:47 -04:00
Matthew Hoops dce05c520b AUDIO: Be consistent with calling stop() in OPL destructors 2015-07-07 20:19:46 -04:00
Matthew Hoops cc6e304af1 AUDIO: Limit the DOSBox start(0) hack to only being called once 2015-07-07 20:19:44 -04:00
Matthew Hoops b9307ef1a4 AUDIO: Introduce a callback to the OPL code
Currently unused, but ready to be hooked up to various classes using it.
2015-07-07 20:19:42 -04:00
Matthew Hoops 2e8f9dcec9 AUDIO: Remove the sample rate configuration from the OPL code 2015-07-07 20:19:42 -04:00
Johannes Schickel 452cec49d9 AUDIO: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Johannes Schickel 1c024519d5 AUDIO: Add easy way to write to OPL3's secondary register set. 2012-10-01 01:50:23 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn 42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00