VOGONS


First post, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

When Sound Blaster Pro switches to stereo mode it halves the sampling rate from 44k.1Hz to 22.05kHz, only certain games use the stereo feature of the SB-Pro.
Some of these games will leave the SB-Pro in stereo mode after you quit the game but the problem is the sampling rate is still halved so other games will not sound right.

To quickly recreate this bug:

1. Enter Duke Nukem 3D setup, Choose SB-Pro 2.0 from Card Type.

1.png
Filename
1.png
File size
25.91 KiB
Views
1314 views
File license
Fair use/fair dealing exception

2. Continue the setup and make sure you select Stereo:

2.png
Filename
2.png
File size
25.91 KiB
Views
1314 views
File license
Fair use/fair dealing exception

3. Now the important part that actually creates this bug.
Play the Test Sound.

3.png
Filename
3.png
File size
24.04 KiB
Views
1314 views
File license
Fair use/fair dealing exception

Exit the setup, save or not save, doesn't matter, the damage is already done, the sampling rate is halved.
All you have to do is play a game like Prince of Persia 1/2, Mortal Kombat 2, Supaplex, or any other game that don't have its own SB driver (not Doom),
you'll hear terrible low sampling rate sound effects, half of what it should be.

To fix this simply do the same but choose Mono in the setup and play Test Sound, now the SB-Pro should be back to normal.
Another fix is to run a more advance game that has it's own sound driver like Doom, Warcraft 1/2 that switches the SB-Pro back to mono.

Tested games that create the bug at exit:
Duke3D, Death Rally, Transport Tycoon, MPXPlayer.
All have to be set as SB-Pro with Stereo in their setup configurations.

I have tested this with ES1688F and YMF719 cards.

EDIT:
This can be recreated in DOSBox so the bug is actually the game not switching the SB-Pro back to Mono at exit.
Further down the thread Jepael created a small "sbpmono.com" program that brings the SB-Pro back to mono mode.
Sound Blaster Pro stereo bug

Last edited by James-F on 2016-08-27, 16:18. Edited 7 times in total.


my important / useful posts are here

Reply 1 of 16, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++

And Prince of Persia 1/2, Mortal Kombat 2, Supaplex would otherwise play at 44 KHz?

And I guess a reboot would also fix this? That's my standard process 😊

YouTube, Facebook, Website

Reply 2 of 16, by James-F

User metadata
Rank Oldbie
Rank
Oldbie
PhilsComputerLab wrote:

And Prince of Persia 1/2, Mortal Kombat 2, Supaplex would otherwise play at 44 KHz?

The sampling rate of the card has nothing to do with the quality of the game audio, the SB-Pro is 44.1kHz in mono and 22.05kHz in stereo.
The games themselves vary but most common is 11kHz sounds, halve that and you get 5.5Khz.
The bug is actually in the hardware.
I have included a fix without restarting the PC.

Last edited by James-F on 2016-08-27, 11:58. Edited 1 time in total.


my important / useful posts are here

Reply 3 of 16, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++

So everything gets halved?

A 11 KHz sample in Wing Commander 2, would then play at 5 KHz?

YouTube, Facebook, Website

Reply 4 of 16, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

If it's not one of the games that fix it, yes, the sound should be half as good as it already is in WC2. 😀

More games that affected by the bug: Prehistoric 2, Summer/Winter Challenge.

Last edited by James-F on 2016-08-27, 12:15. Edited 1 time in total.


my important / useful posts are here

Reply 5 of 16, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++
James-F wrote:

If it's not one of the games that fix it, yes, the sound should be half as good as it already is in WC2. 😀

Ah, ok, yes that's a bug alright 😀

YouTube, Facebook, Website

Reply 7 of 16, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

If your SB is at address 220H, please try this quick hack I just made:

Attachments

  • Filename
    sbpmono.zip
    File size
    197 Bytes
    Downloads
    70 downloads
    File comment
    Small program to set SB Pro mixer to mono mode
    File license
    Fair use/fair dealing exception

Reply 8 of 16, by James-F

User metadata
Rank Oldbie
Rank
Oldbie
Jepael wrote:

If your SB is at address 220H, please try this quick hack I just made:

IT WORKS !
This little hack actually brings the SB-Pro back to mono and everything sounds normal again.
Well done Jepael, thank you.

Can you elaborate what it actually does?
I think it will be wise to write a small txt description in the zip along with the com file for DOS reading.

Do you mind if I repost it in the first post?

Last edited by James-F on 2016-08-27, 13:26. Edited 2 times in total.


my important / useful posts are here

Reply 9 of 16, by firage

User metadata
Rank Oldbie
Rank
Oldbie

I think it was just never considered a big deal to power cycle the machine between gaming sessions or whenever some weird glitches cropped up. 😀

My big-red-switch 486

Reply 10 of 16, by Scali

User metadata
Rank l33t
Rank
l33t

How is that a bug in the SB Pro though?
I mean, it sounds like the game just doesn't bother to take the SB Pro out of stereo mode after you exit it.
Since some games are written only for regular Sound Blaster, they don't even know about mono or stereo mode, so they never bother to reset it (they assume it's always in the correct mode, because there is only one).

Perhaps some background info:
The SB Pro has a very basic implementation of 'stereo':
Instead of sending 44.1k samples per second through a single channel, it sends 44.1k samples per second to two channels, the even ones go to the left channel, the odd ones to the right channel (it sorta ping-pongs them left/right).
So the card is still configured for 44.1 KHz sample transfers. Perhaps what happens is that games play eg 11 KHz mono samples, and set it to 11 KHz, but the 'ping pong' feature is still enabled as well, so effectively it sends 5.5k samples left and 5.5k samples right. Technically it is stereo, but if you play mono samples, you probably don't hear any stereo effects, because the difference between the two channels is purely accidental, and very minor.

If clones don't have the same behaviour, I say that's a flaw in their implementation. They didn't copy the functionality of the SB Pro DSP chip accurately enough.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 11 of 16, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

You are right Scali, this is not actually a bug of the SB-Pro but the game that doesn't bring it back to mono at exit.
Still, it is good to be aware of the games that create the bug, and affected by it.

EDIT:
I can actually recreate the bug in DOSBox.
Even though sbtype=sb16 when I setup the game with SB-Pro Stereo as in the first post I can recreate the bug.
So the SB-Pro emulation in dosbox is quite accurate.
Jepael's sbpmono.con fix also works in dosbox.


my important / useful posts are here

Reply 12 of 16, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++

It's funny, because I always knew to reboot the machine after playing Doom or Duke 3D. But I never quite new why 😁 But these games have often been mentioned to "screw things up". 😊

YouTube, Facebook, Website

Reply 13 of 16, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
James-F wrote:
IT WORKS ! This little hack actually brings the SB-Pro back to mono and everything sounds normal again. Well done Jepael, thank […]
Show full quote
Jepael wrote:

If your SB is at address 220H, please try this quick hack I just made:

IT WORKS !
This little hack actually brings the SB-Pro back to mono and everything sounds normal again.
Well done Jepael, thank you.

Can you elaborate what it actually does?
I think it will be wise to write a small txt description in the zip along with the com file for DOS reading.

Do you mind if I repost it in the first post?

Glad it worked, I didn't even test it before posting 😁

I made a new zip file with DOS compatible description text (linux has different line endings). Go ahead and put that in your first post if you like.

Meanwhile Scali explained the issue; a game supporting SB Pro and using stereo mode, leaves the mixer in stereo mode, so next games that are not SB Pro aware do not control the mixer back to mono mode before playing samples.

This tool just sets the mixer back to mono mode, which is the default setting after reboot and mixer reset.

The thing is, I can't quite understand why the samples sounds halved. For example, when playing 44kHz mono or 22kHz stereo, DSP is configured to play 44kHz samples per second in either case. So playback time of X samples should be identical in mono and stereo modes and so the rate should not be halved, you should just hear maybe some weird phasing effects instead.

Attachments

  • Filename
    sbpmono.zip
    File size
    606 Bytes
    Downloads
    64 downloads
    File comment
    SBPMONO tool V0.1
    File license
    Fair use/fair dealing exception

Reply 14 of 16, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

Here is an example straight from DOSBox.
It reflects exactly what I hear with the actual hardware.

It does sound like it has some phase effect but I can also hear some stereo separation in certain sounds, both are obviously side effects.
But the most obvious difference is the halved sampling rate.

Attachments

  • Filename
    After Stereo.mp3
    File size
    1.6 MiB
    Downloads
    62 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    Before Stereo.mp3
    File size
    1.79 MiB
    Downloads
    53 downloads
    File license
    Fair use/fair dealing exception


my important / useful posts are here

Reply 15 of 16, by Scali

User metadata
Rank l33t
Rank
l33t
Jepael wrote:

The thing is, I can't quite understand why the samples sounds halved. For example, when playing 44kHz mono or 22kHz stereo, DSP is configured to play 44kHz samples per second in either case.

I think that is why:
If you set the DSP to 44 KHz, it is 44 KHz in mono, but 22 KHz in stereo, so that's why it is halved.
Namely, at 22 KHz the samples are 'twice as long'... You just have a left and right sample.

Mind you, listening to the samples from James-F, they don't sound 'halved' indeed... They sound a bit more 'muffled', because the sampling rate is lower, but indeed, not like it's downsampled. Speedwise/pitchwise they're still quite close, just some weird 'phasing'.
So I think that's what you meant.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 16 of 16, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
Scali wrote:
I think that is why: If you set the DSP to 44 KHz, it is 44 KHz in mono, but 22 KHz in stereo, so that's why it is halved. Namel […]
Show full quote
Jepael wrote:

The thing is, I can't quite understand why the samples sounds halved. For example, when playing 44kHz mono or 22kHz stereo, DSP is configured to play 44kHz samples per second in either case.

I think that is why:
If you set the DSP to 44 KHz, it is 44 KHz in mono, but 22 KHz in stereo, so that's why it is halved.
Namely, at 22 KHz the samples are 'twice as long'... You just have a left and right sample.

Mind you, listening to the samples from James-F, they don't sound 'halved' indeed... They sound a bit more 'muffled', because the sampling rate is lower, but indeed, not like it's downsampled. Speedwise/pitchwise they're still quite close, just some weird 'phasing'.
So I think that's what you meant.

No, definitely not halved. I just assumed because the first post said so and I kept wondering why I don't get the reason it is halved. The MP3s sound just as I expected.

The sampling rate rate of the DAC itself is identical in mono and stereo modes. But when playing mono sample in stereo mode, for left channel, you get half the samples and so samples for each channel are twice as long, so the pitch is correct. You just get a bit different audio on left and right channels so it isn't mono, it sounds like stereo expansion. Plus, when playing mono sample in stereo mode, what the mixer is essentially doing is downsampling both channels by throwing away every other sample, is the worst way of downsampling so you get aliasing artifacts.