Invert Left/Right Audio Channels Stereo Sound?

Here you can discuss the development of patches.

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby rfnagel » 2009-12-04 @ 04:04

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
User avatar
rfnagel
Oldbie
 
Posts: 1194
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Raptor007 » 2010-2-21 @ 06:29

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! :confused: Oh well, as long as it's fixed, I'm happy! :wink:

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!
User avatar
Raptor007
Newbie
 
Posts: 1
Joined: 2010-2-21 @ 05:22

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby rfnagel » 2010-3-09 @ 22:52

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 LOL!) 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
User avatar
rfnagel
Oldbie
 
Posts: 1194
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Flint Eastwood » 2010-7-21 @ 23:29

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! :confused: Oh well, as long as it's fixed, I'm happy! :wink: ...

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 . :happy:

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.
viewtopic.php?t=16462&postdays=0&postorder=asc&start=157
i7 870 + Zotac 470GTX AMP! + 12GB RAM + Win7 64Bit
User avatar
Flint Eastwood
Newbie
 
Posts: 31
Joined: 2005-6-25 @ 12:44

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Serious Callers Only » 2010-8-24 @ 09:53

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?
Serious Callers Only
Member
 
Posts: 331
Joined: 2003-4-26 @ 21:34

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Flint Eastwood » 2010-8-25 @ 22:27

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
User avatar
Flint Eastwood
Newbie
 
Posts: 31
Joined: 2005-6-25 @ 12:44

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Serious Callers Only » 2010-8-26 @ 15:22

No it was just in case the patch didn't work for all games.
Serious Callers Only
Member
 
Posts: 331
Joined: 2003-4-26 @ 21:34

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby realnc » 2010-10-13 @ 19:41

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.
realnc
Member
 
Posts: 143
Joined: 2010-10-13 @ 11:02

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby realnc » 2010-10-14 @ 08:06

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.
You do not have the required permissions to view the files attached to this post.
realnc
Member
 
Posts: 143
Joined: 2010-10-13 @ 11:02

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby HunterZ » 2010-11-26 @ 04:43

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.
User avatar
HunterZ
l33t++
 
Posts: 6048
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby rfnagel » 2010-11-26 @ 05:54

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
User avatar
rfnagel
Oldbie
 
Posts: 1194
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby ripsaw8080 » 2010-11-27 @ 01:13

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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4045
Joined: 2006-4-25 @ 23:24

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby ripsaw8080 » 2010-11-27 @ 01:17

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.
You do not have the required permissions to view the files attached to this post.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4045
Joined: 2006-4-25 @ 23:24

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Qbix » 2010-11-27 @ 07:41

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!
User avatar
Qbix
DOSBox Author
 
Posts: 10346
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby ripsaw8080 » 2010-11-27 @ 08:30

Code: Select all
 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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4045
Joined: 2006-4-25 @ 23:24

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby rfnagel » 2010-11-27 @ 09:49

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
User avatar
rfnagel
Oldbie
 
Posts: 1194
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby HunterZ » 2010-11-28 @ 03:43

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.
User avatar
HunterZ
l33t++
 
Posts: 6048
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby rfnagel » 2010-11-28 @ 11:58

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
User avatar
rfnagel
Oldbie
 
Posts: 1194
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby wd » 2010-11-28 @ 12:28

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.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby HunterZ » 2010-11-28 @ 17:15

wd wrote:
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.
User avatar
HunterZ
l33t++
 
Posts: 6048
Joined: 2003-1-31 @ 19:04
Location: Seattle

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests