Invert Left/Right Audio Channels Stereo Sound?

Here you can discuss the development of patches.

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby James-F » 2016-10-24 @ 13:46

The discussion continues on this thread:
It is already confirmed that the SBPro2 CT1600 DSP v3.01 and v3.02 will always start a fresh PCM stream from the first left sample, no matter on what sample the last stream ended.
In other words, SBTEST will always play the Left channel in both tests on all revisions of the SBPro2 CT1600 cards.

It is confirmed that CT1330 Rev.05 and 06 behave exactly the same as CT1600, they play twice on the left channel.

CT1330A Rev.04 also behave exactly like CT1600.
DOSBox has the SBPro emulation reversed and the extra byte has not effect whatsoever on the real SBPro cards, only on the clones.
User avatar
Posts: 1448
Joined: 2015-11-30 @ 04:10

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby rolloLG » 2019-11-12 @ 16:06

ripsaw8080 wrote:A direct modification of the Miles SB16 driver has some advantages over the swapstereo patch:

1) It doesn't require an unofficial build of DOSBox; and if you're using an unofficial build that doesn't have the swapstereo patch, it will work there as well.

2) It targets only the SB audio. The swapstereo patch reverses the channels of all inputs to the mixer.

3) It has an effect at the point where it's needed. The swapstereo patch is unaware of when the channels first become reversed, which can be a problem when the channels are reversed in-game, but not in videos.

A brief explanation of the issue with the driver: it sets up two samples worth of data for its initial stereo DMA transfer, but for some reason instructs the DSP to use only one sample, resulting in reversed channels because DOSBox keeps track of "leftover" samples from previous transfers. The issue with DOSBox is avoided by changing the driver to use both samples; and the modified driver still works correctly on a real SB16.

To modify the driver, run the attached program inside DOSBox in a folder where SB16.DIG is located (preferably an installed copy). The driver file has several variations, so the program searches for the correct offset to modify. If you encounter a version of SB16.DIG that the program does not recognize, and you're sure it is a Miles AIL3 driver, send me a PM so I can examine it.

The swapfix.exe patch doesn't work here: it does patch the SB16.DIG of Albion and Magic Carpet 2, but audio is still reversed here with DOSBox 0.74-3 stock.
My .conf:

My PC specs:
Gaming Laptop ASUS GL703GS (BIOS 310)
CPU i7-8750H (iGPU unavailable)
GTX 1070 8GB (non-Max-Q, vbios 86.04.7c.00.24, Samsung VRAM)
Windows 10 Pro 1903
Desktop res: 1080p (1920x1080)
Screen: 144Hz + g-sync AUO B173HAN03.2 [AUO329D]
Audio: Realtek HD Audio (ALC295 chipset)
Hard disks: NVMe Samsung, SSD Crucial
USB Blu-Ray 4K drive: Archgon Star MD-8102P-U3YC-UHDB (Pioneer BDR-UD04)

Solved! Didn't change in my .conf file the sbtype=sb16 (since SB16.DIG was patched), ooops!
Thanks ripsaw8080
User avatar
Posts: 52
Joined: 2008-6-24 @ 17:21


Return to DOSBox Patches

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests