VOGONS


Invert Left/Right Audio Channels Stereo Sound?

Topic actions

Reply 40 of 83, by rfnagel

User metadata
Rank Oldbie
Rank
Oldbie

Sorry to dig up this old thread, but I see the same problem in Looking Glass' Terra Nova. Although the game has a 'reverse channels' option which fixes the sound during gameplay, the Smacker cutscenes ALSO unfortunately are reversed (making them slightly wierd looking/sounding).

Rich ¥Weeds¥ Nagel
http://www.richnagel.net

Reply 41 of 83, by Raptor007

User metadata
Rank Newbie
Rank
Newbie

Well, this is bizarre. I noticed that the MechWarrior 2 sound effects were reversed in the official DOSBox 0.73, so I downloaded Flint's build and set swapstereo=true. However, the sounds were still reversed, so I set swapstereo=false. Now they're correct! 😕 Oh well, as long as it's fixed, I'm happy! 😉

It's kind of surprising that there's no official "reverse stereo" option in DOSBox, especially considering how many games seem to have a problem with swapped channels!

Reply 42 of 83, by rfnagel

User metadata
Rank Oldbie
Rank
Oldbie

Just to add to the list:

"ACiD Tetris" (later known as "Super ACiD Block Attack", due to legalities with the Tetris Company (R)(R)(R)(C)(C)(C)... figured I'd better add that in there to cover my arse 🤣!) also suffers from the reversed stereo problem. FWIW, neither of these games use the Miles or HMI sound drivers.

BTW, my memory fades (it's been a while), but I swear I seem to remember the stereo being reveresed on a native DOS PC with an actual SB16 as well as an SBPro.

Rich ¥Weeds¥ Nagel
http://www.richnagel.net

Reply 43 of 83, by Flint Eastwood

User metadata
Rank Newbie
Rank
Newbie
Raptor007 wrote:

...so I downloaded Flint's build and set swapstereo=true. However, the sounds were still reversed, so I set swapstereo=false. Now they're correct! 😕 Oh well, as long as it's fixed, I'm happy! 😉 ...

You don't need to set swapstereo=true. The patch should start the soundblaster with the correct channels. Only if there are somehow swapped channels in game X you can swap channels by yourself . 😀

By the way:
I made a new build based on Dosbox 0.74.
It has SwapSound and Glide support:
download.php?id=7897

I posted it in the Glide-Patch Thread and I don't want upload it twice.
Glide patch

i7 870 + Zotac 470GTX AMP! + 12GB RAM + Win7 64Bit

Reply 44 of 83, by Serious Callers Only

User metadata
Rank Member
Rank
Member

Wouldn't it be better to have both the setting and a blacklist , for a kind if "auto" setting as the default?
Like dynamic core in cpu is blacklisted for some games?

Reply 45 of 83, by Flint Eastwood

User metadata
Rank Newbie
Rank
Newbie

I think a blacklist is not needed. All games should have correct channels with the patch.
Do you have a game which doesn't work?

i7 870 + Zotac 470GTX AMP! + 12GB RAM + Win7 64Bit

Reply 46 of 83, by Serious Callers Only

User metadata
Rank Member
Rank
Member

No it was just in case the patch didn't work for all games.

Reply 47 of 83, by realnc

User metadata
Rank Oldbie
Rank
Oldbie

Do you have the swap audio patch for 0.74? The one you posted for 0.73 does not apply to 0.74:

patching file src/dosbox.cpp
Hunk #1 FAILED at 457.

Reply 48 of 83, by realnc

User metadata
Rank Oldbie
Rank
Oldbie

OK, never mind. It turns out the patch was easy to update for 0.74 (also works with current SVN at the time of this post.) I'm attaching it in case anyone wants to use it.

It fixed stereo in all games for me, and especially Albion where the swapped channels are really annoying since that game makes heavy use of stereo for directional effects.

Reply 49 of 83, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

It was mentioned that System Shock (at least the CD-ROM version, didn't test the floppy one) is affected by the DOSBox reversed Sound Blaster stereo issue, and that System Shock has a built-in reverse stereo option that can be used as a workaround. What wasn't mentioned, however, is that System Shock's reverse stereo option reverts to OFF every time you exit and reload the game, which is quite annoying! (edit: Apologies to ripsaw, who did in fact mention it - but it's worth repeating 😀)

I should also mention that I tried selecting SB16, SBPro and Old SBPro in the game installer and they all had the issue with DOSBox set to sbtype=sb16. I didn't try changing the DOSBox setting.

Another interesting case / data point is Descent (Definitive Collection CD-ROM version), which uses HMI but does NOT suffer from the reversed stereo issue. The installer plays sounds from left and right channels and allows you to set a reversed mode, but it is not needed for DOSBox 0.74 because the sound comes from the correct channels by default.

Last edited by HunterZ on 2010-11-28, 17:17. Edited 1 time in total.

Reply 50 of 83, by rfnagel

User metadata
Rank Oldbie
Rank
Oldbie
HunterZ wrote:

What wasn't mentioned, however, is that System Shock's reverse stereo option reverts to OFF every time you exit and reload the game, which is quite annoying!

'Tis the same with Terra Nova as well. And also in TN, when using the game's own "Swap Stereo" feature, even though the game sound effects are proper, the cutscenes are still reversed.

Rich ¥Weeds¥ Nagel
http://www.richnagel.net

Reply 51 of 83, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
HunterZ wrote:

What wasn't mentioned, however, is that System Shock's reverse stereo option reverts to OFF every time you exit and reload the game, which is quite annoying!

I mentioned it in my first two comments in this thread.

Reply 52 of 83, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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.

Reply 53 of 83, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

yeah or we fix dosbox with with uneven sound transfers by simply ignoring the last byte or doubling it.
Of course that needs some testing on a real pc.

Water flows down the stream
How to ask questions the smart way!

Reply 54 of 83, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
 static void DSP_DoDMATransfer(DMA_MODES mode,Bitu freq,bool stereo) {
char const * type;
sb.mode=MODE_DMA_MASKED;
sb.chan->FillUp();
sb.dma.left=sb.dma.total;
+ sb.dma.remain_size=0;
sb.dma.mode=mode;
sb.dma.stereo=stereo;

If you recall, I suggested the above; it's simple and effective, but still the problem of verifying that its correct. Despite a lack of proof, I can't help thinking that retaining an odd leftover sample (half of a stereo pair) when starting a new transfer doesn't make much sense... if nothing else, the sample types could be different.

Reply 55 of 83, by rfnagel

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote:

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.

Many thanks, ripsaw8080, the patch works like a champ! 😀

I tried it with Terra Nova's SB16.DIG (dunno the version of the driver though [SB16.DIG - 2,836 bytes - 6/18/1995 - 6:00am], I had a looksie with a hex editor, and couldn't find any version info contained in the file).

Terra Nova's sound effects (as well as the cutscene movies) are now properly panned... all without setting them for "Swapped" within the game's configuration menu/screen (which would normally correct the digital sound effects, but NOT the stereo audio in the game's cutscenes) 😀

Rich ¥Weeds¥ Nagel
http://www.richnagel.net

Reply 56 of 83, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Has anyone ever observed reversed stereo on a real machine that wasn't due to physically hooking things up backwards? Unless that is actually known to happen under some circumstance(s), I don't see how DOSBox's current behavior could be considered a safer default behavior than ripsaw8080's suggested patch.

Reply 57 of 83, by rfnagel

User metadata
Rank Oldbie
Rank
Oldbie
HunterZ wrote:

Has anyone ever observed reversed stereo on a real machine that wasn't due to physically hooking things up backwards?

My memory eludes me, so's I can't cite specific games. But, I've definitely seen (heard) this problem throughout the years with several DOS games with an SB16 as well as an AWE32 (both of which were connected properly to my speakers). I wish I could remember exactly which games that they were, but I do remember finding a couple that had that problem.

IIRC, the ones in question though had options to "swap stereo" in the game's config.

It's been so long though, but I'm thinking that one of them may have just been the afore-mentioned Terra Nova (?).

Rich ¥Weeds¥ Nagel
http://www.richnagel.net

Reply 58 of 83, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I don't see how DOSBox's current behavior could be considered a safer default behavior than ripsaw8080's suggested patch

Who said that?
Qbix already said that a verified fix would be very appreciated and to me
ripsaw's patch looks quite to the point to me. So if somebody has already done
extensive game checking regarding stereo appearance with the fix enabled,
and/or some nice means of verifying this against real hardware (yes that you
are able to hook up your stereo system in the right way is a start) i'm positive
this can be checked in sooner or later.

Reply 59 of 83, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
wd wrote:
Who said that? Qbix already said that a verified fix would be very appreciated and to me ripsaw's patch looks quite to the point […]
Show full quote

I don't see how DOSBox's current behavior could be considered a safer default behavior than ripsaw8080's suggested patch

Who said that?
Qbix already said that a verified fix would be very appreciated and to me
ripsaw's patch looks quite to the point to me. So if somebody has already done
extensive game checking regarding stereo appearance with the fix enabled,
and/or some nice means of verifying this against real hardware (yes that you
are able to hook up your stereo system in the right way is a start) i'm positive
this can be checked in sooner or later.

Sounds good. I'll see about giving ripsaw's patch a try with System Shock since I've got DOSBox 0.74 building in Visual C++ Express 2010. If I do that then I'll also sanity check with some non-reversed games like Descent.

Update:
Space Quest 1 VGA:
- I was mistaken about this being Sound Blaster related. Apparently the footstep sounds come from the MT-32, and I just discovered (by testing in Cakewalk) that either my MT-32's sound outputs or my SC-88's sound inputs are labeled backwards!

System Shock 1:
- Stereo is no longer reversed by default. Couldn't tell if the intro movie was affected either way, as there isn't anything noticeably stereo in it.

Descent:
- Still sounds correct.

X-Wing CD sound setup:
- TIE fighter is still left-to-right, as expected.

Albion:
- Sound is no longer reversed. This game really benefits from the fix because it uses a lot of sounds that correspond to the location of on-screen objects, and it has no reverese stereo option.