Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Audio
Audio Samples
 Sound Blaster 16 (SB16) Sample Driv...
Windows Driver Kit: Audio Devices
Sound Blaster 16 (SB16) Sample Driver

Description

The SB16 sample driver demonstrates the basics of writing a Microsoft Windows Driver Model (WDM) audio driver.

Theory of Operation

The SB16 sample driver works with any Sound Blaster 16-compatible audio card, but it might not use all of the functionality.
 
You can use this sample as the starting point for writing your own WDM audio driver.
 
Please see both the Implementation and Design section below and the comments in the driver source files. This information will help you to add functionality such as power management to your driver.
 
This sample supports digital rights management (DRM) for audio. The Sources file has a flag to enable DRM. Note that you will need additional header files for DRM support (for example, see the implementation of DRM support in the MSVAD sample audio drivers).

Implementation and Design

You should be aware of the following issues when testing or otherwise using this sample driver:
  • This sample driver shows how to implement event callbacks. However, only Vibra class devices with C16X mixers (CT4170) support this functionality, and this sample driver does not support Vibra class devices.
  • This driver does not support the AWE portion of AWE-capable devices such as the AWE32 or AWE64. Because the sample driver does not service the AWE devnode, it does not initialize the AWE devnode. As a result, MIDI that is played back using the FM synth will not be audible. This is not a bug with the FMSynth miniport driver or other aspect of the sample driver. It is simply a result of not initializing the AWE devnode.
  • Under some circumstances, wave audio playback might hang if the rendering stream is frequently stopped and started. This intermittent problem is specific to Sound Blaster 16 hardware.

Building the Sample

To build this sample, enter the free or checked build environment and run the build command from the \sb16 directory.

Installation

General

After building the sample driver, you can use the mssb16.inf INF file to install the driver. First, copy the INF file and driver binary to a floppy disk. Next, to install the sample, display the floppy contents in Windows Explorer, right-click the INF file, and click Install on your test machine.
 
After the INF file has installed the sample driver, you can update and test your new versions of the driver by simply copying the binary into directory %SystemRoot%\system32\drivers on the target machine and restarting. This technique is sufficient unless you also make changes to the INF file.

Code Tour

File Manifest

FileDescription
adapter.cpp Connects the driver with the system.
common.cpp Common object used by all miniport drivers
common.h Header file for the common object
makefile Make file
mintopo.cpp Implementation of Topology miniport driver
mintopo.h Header file for the Topology miniport driver
minwave.cpp Implementation of the WaveCyclic miniport driver
minwave.h Header file for the WaveCyclic miniport driver
mssb16.inf Set-up information
readme.htm This sample documentation file
sb16.rc Resource file containing version information
sources Dependency information for compiling
tables.h Topology and property tables
Build machine: CAPEBUILD
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker