The Creative Lab's Sound Blaster for OS/2 drivers' bug list

By Julien Pierre

Several bugs were discovered in Creative Labs' Sound Blaster OS/2 drivers during the development of the Digital Sound & Music Interface for OS/2, Dual Module Player, the Digital Sound & Music Interface plug-in for Netscape Navigator/2, and the Flight for OS/2 demonstration.

The most common bug affects Sound Blaster Pro users.

The SB Pro for OS/2 driver capabilities bug
The SBP*.SYS OS/2 drivers written by Creative Labs have a problem returning the proper capabilities of the soundcard.

According to Creative, a Sound Blaster Pro version 1.0 allows PCM audio at up to 8 bit 22 kHz stereo, or 8 bit 44 kHz mono. The Sound Blaster Pro version 2.0 goes up to 8 bit 44 kHz stereo. However, the later mode doesn't really seem to be possible with CL's OS/2 drivers, even though the driver does report that it's feasible.

So, why are many others OS/2 applications unaffected by this problem ?

The answer is that they play files with data-specific PCM rates. The most common type of files you usually play under OS/2 is WAV files. The WAV files have the resolution (8 or 16 bits), sampling rate (usually 11, 22 or 44 kHz), and polyphony (mono or stereo) coded in their header. When you attempt to play a WAV file, OS/2 reads its header and tries to set the soundcard accordingly. So, if you try to play a 16 bit WAV file on an SB Pro with an 8-bit DAC, you will not be able to play it. But on the other hand, if you play an 8-bit WAV file on a card with a 16-bit DAC, you will not gain anything in quality.

The bottom line is this : as long as you don't try to play a 44 kHz 8 bit stereo WAV file on your SB Pro, you'll not encounter the bug.

Digital Sound & Music Interface for OS/2 works very differently. The PCM rate is entirely data independent, because DSMI/2 features a software mixer that can translate any type of PCM data to another.

This allows DSMI/2 to best take advantage of the capabilities of your soundcard and produce sound as good as your soundcard will be able to output.

Thus, DSMI/2 programs doesn't use a fixed PCM mode. It tries to autodetect the capabilities of your soundcard. Since under OS/2, an application does not access the hardware directly, it calls MMPM/2 to find the best match.

It will first try 16 bit stereo at 44 kHz, then 22 kHz, then 11 kHz, then 8 bit stereo at 44 kHz, 22 kHz and 11 kHz, then 16 bit mono at 44 kHz, 22 kHz, and 11 kHz, then 8 bit mono at 44 kHz, 22 kHz and 11 kHz.

As soon as the driver says it is OK, the DSMI initialization stops looking further and initializes the soundcard with the parameters.

What happens with the Sound Blaster Pro is that the driver acknowledges the 8 bit 44 kHz stereo mode. DSMI/2 will then begin to calculate real-time data in memory at that rate. However, the driver is really only streaming the buffers at 22 kHz, and thus the produced is weird - it's at half speed.

This problem will prevent you from running the DSMI Netscape plug-in and Flight/2 entirely if you are using an SB Pro. They will both play at half speed. Since Flight/2 is synchronized with the audio, it will last twice as long as it normally should when your soundcard is an SB Pro.

You can, however, get Dual Module Player to work if you override the autodetection by adding the /22K parameter on the command-line version of DMP to force a 22 kHz sampling rate. For Dual Module Player/Presentation Manager, uncheck the "autodetection" box and then click the 22 kHz radio button instead of 44 kHz which was auto-detected.

Flight/2 and the DSMI plug-in for Netscape Navigator/2 do not have options to override the default. They were made to be easy to use and not require any configuration. In the case of the Netscape plug-in, it would be a lot of work to add configuration options since command-line parameters cannot be passed.

The SB 16 for OS/2 driver MIDI and PCM concurrency bug
At the moment, no one is doing much serious MIDI under OS/2.

In my spare time, I am working on some very interesting applications to map input from a MIDI device, such as a keyboard, to PCM digital samples via the Digital Sound & Music Interface for OS/2 and the OS/2 Warp 4 Real Time MIDI subsystem.

However, my experiments have shown that such an application was not possible using Creative Labs SB16 card - which is what I have currently for a soundcard.

Taken independently, PCM audio using DART works with the SB16.

RTMIDI also works on it for both recording and playback, using the SB16's MPU-401 UART MIDI port.

However, try to run them at once, and you'll discover that the MIDI port is killed by PCM.

If you start PCM audio first, then MIDI, PCM will play, but you'll not get any MIDI.

If you start MIDI first, then PCM, MIDI will start flowing, and stop as soon as PCM starts.

By putting a second MIDI card in the machine (the card is only an MPU 401, not a Sound Blaster), I have determined that this problem is a limitation of Creative Labs' SB16 driver. The SB16 hardware allows for this - I routinely use "Roland & Soundblaster" options in DOS games; but CL's OS/2 driver doesn't allow that : it's resetting the MIDI port of the card whenever there is any call to it - whether it is for PCM, mixer, or FM synthesis.

I browsed Creative Labs' web site and I haven't found any Internet support for developers, so I have no idea how to report those problems to them.