Differences in Support for Non-PCM Formats

The discussion below summarizes the level of support for non-PCM audio formats that is provided by the Microsoft Windows Driver Model (WDM) audio framework in the different versions of Windows that are available. For background information about this topic, see Supporting Non-PCM Wave Formats.

Windows 98 Gold

Windows 98 Gold provides no support for non-PCM wave formats through DirectSound, the waveOut API, or any other audio interface that uses the SysAudio system driver. For information about DirectSound and waveOut, see the Microsoft Windows SDK documentation.

Windows 98 Second Edition

Like Windows 98 Gold, Windows 98 SE has no support for non-PCM wave formats, except that the USBAudio class system driver (Usbaudio.sys) can handle the packed AC-3 format through DirectShow. (This format is described in USB Audio Support for Non-PCM Formats.) However, USBAudio still provides no support for non-PCM formats to waveOut and DirectSound applications.

Windows 98 SE + Hotfix

Installing the hot-fix package for Windows 98 SE enables support for non-PCM formats for waveOut applications that use PortCls devices. (The hotfix is described in Additional Requirements for Windows 98.) However, the following caveats apply:

  • The waveOutGetPosition function (see Microsoft Windows SDK documentation) retrieves incorrect timing information for streams with non-PCM formats.

  • An adapter driver that wants to provide non-PCM support to waveOut applications should provide a non-PCM data range with the format specifier set to KSDATAFORMAT_SPECIFIER_WAVEFORMATEX. Although PortCls automatically clones the miniport driver's data ranges from KSDATAFORMAT_SPECIFIER_WAVEFORMATEX to KSDATAFORMAT_SPECIFIER_DirectSound, it does so only for PCM data ranges. (You can confirm this by running the KsStudio utility from the Windows Driver Kit [WDK].) To make its non-PCM support accessible to DirectSound applications, the driver needs to explicitly specify a second copy of the same data range and set the format specifier for this data range to KSDATAFORMAT_SPECIFIER_DirectSound. For more information, see Specifying AC-3 Data Ranges.

  • When a driver defines a non-PCM pin, this causes a "phantom control" to show up in the window of the SndVol32 "Volume Options" program (Sndvol32.exe) that ships with Windows. SndVol32 displays a non-PCM pin as a grayed-out SRC mixer line without a slider or other control. (You can confirm this behavior by running the sample mixer application, Mixapp.exe. See the description of this application in the Visual C++ audio samples in the Windows SDK.) Users might find this display confusing. For this reason, some hardware vendors choose not to expose their AC-3 pins on Windows 98 SE.

The version of DirectSound that ships with Windows 98 SE does not support non-PCM formats. However, when DirectSound 8 is installed in Windows 98 SE + hotfix, DirectSound applications can use non-PCM formats with both PortCls devices and USB audio devices.

Windows Me

Windows Me provides support for non-PCM formats for waveOut applications that use PortCls devices.

The waveOutGetPosition call works correctly for non-PCM streams.

PortCls automatically clones non-PCM data ranges for DirectSound.

The problem with phantom sliders in SndVol32 (see Windows 98 SE + Hotfix) is fixed.

The IPortClsVersion interface is not implemented, but other means of determining the operating system version are available. For example, you can detect the operating system version by calling IoIsWdmVersionAvailable.

In Windows Me, the USBAudio driver does not support the packed AC-3 format through DirectShow. Also, USBAudio does not support non-PCM formats for DirectSound applications that use the built-in DirectSound implementation. However, when DirectSound 8 is added to Windows Me, DirectSound applications can use non-PCM formats on USB audio devices.

The initial hot-fix package that has been released for Windows Me contains no non-PCM fixes.

Windows 2000

Like Windows 98, Windows 2000 provides no support for non-PCM formats, regardless of DirectSound version.

In Windows 2000, the USBAudio driver does not support packed AC-3 formats through DirectShow. USBAudio also does not support any non-PCM formats for DirectSound applications.

Windows 2000 Service Pack 2

SP2 adds support for non-PCM formats to waveOut applications that use PortCls devices.

PortCls automatically clones non-PCM data ranges for DirectSound.

The IPortClsVersion interface is available in SP2. The IPortClsVersion::GetVersion method retrieves the version number of the installed Portcls.sys system driver.

The waveOutGetPosition call works correctly for non-PCM streams.

SP2 still has the problem with phantom sliders in SndVol32 (see Windows 98 SE + Hotfix).

When DirectSound 8 is added to Windows 2000 SP2, DirectSound applications can use non-PCM formats.

Windows XP

Windows XP supports non-PCM formats for waveOut applications that use PortCls devices.

The waveOutGetPosition call works correctly for non-PCM streams.

PortCls automatically clones non-PCM data ranges for DirectSound.

The built-in version of DirectSound correctly handles non-PCM formats on PortCls devices.

The problem with phantom sliders in SndVol32 (see Windows 98 SE + Hotfix) is fixed.

The USBAudio driver correctly handles packed AC-3 formats through DirectShow. However, USBAudio does not support non-PCM formats for DirectSound applications.

The IPortClsVersion interface is available.

 

 

Send comments about this topic to Microsoft