The Windows DDK includes a number of audio driver samples that illustrate the principles and features of the WDM audio architecture. These are working implementations with source code that can serve as a starting point for writing a proprietary driver.
The DDK contains the following audio driver samples:
A sample audio driver that runs on an Intel motherboard with an integrated AC97 controller. This sample shows how to write a WDM audio adapter driver that implements WavePci support for a PCI add-in card with scatter/gather DMA capabilities. Included with this sample driver are additional subdirectories containing sample code that works in conjunction with the driver. The subdirectories are named as follows:
This sample shows how to write a control panel application. It requires that both the proppage sample DLL and the ac97 sample driver be installed.
This is the sample audio driver for the AC97 controller.
This subdirectory contains an HTML version of the driver's INF file with hot-linked references to INF sections and keyword definitions in order to facilitate easy exploration.
This sample shows how to write a property-page DLL that gets loaded by the device manager when a user elects to display the properties of your device. In addition to displaying the default property sheets, the device manager also displays the property sheet that is defined in the sample. This sample DLL requires that the ac97 sample driver be installed.
Kernel-mode DLS synthesizer. This sample can be adapted for a MIDI output device as well. The implementation of the ddksynth sample is similar to that of the kernel-mode DirectMusic® synthesizer, except that the reverb code has been removed from ddksynth due to licensing restrictions.
MPU-401 miniport driver for processing DirectMusic and MIDI input and output streams. This is the source code for the built-in DMusUART miniport driver in portcls.sys. Hardware vendors can adapt this sample to write their own custom miniport drivers.
FM-synth miniport driver for MIDI. This sample driver provides an interface to a device that implements OPL3-style synthesis. This is the source code for the built-in FMSynth miniport driver in portcls.sys. Hardware vendors can adapt this sample to write their own custom miniport drivers.
The two GFX samples appear in the DDK for Windows XP SP1, Windows Server 2003, and later. These samples implement support for a simple GFX (global effects) filter:
This sample GFX driver performs a simple data transformation on a stereo audio stream that is played through a pair of USB speakers.
This sample implements a property page that the user accesses through the Windows Multimedia control panel in order to configure the GFX filter.
Stand-alone sample adapter driver. This adapter driver implements standard functionality for an MPU-401 MIDI interface device. The source code for this sample is quite small because it uses only the system-supplied miniport drivers that are implemented in portcls.sys.
Microsoft Virtual Audio Device. This is a collection of samples that all use the same "virtual audio device" in lieu of an actual hardware-based adapter driver. Each of these samples highlights a different facet of the WDM audio driver architecture:
Demonstrates support for a non-PCM audio data format.
Demonstrates support for multiple-stream audio with SAP-protected content. For information about SAP (secure audio path), see the Platform SDK documentation.
Demonstrates support for a single audio stream with SAP-protected content.
Demonstrates support for hardware-accelerated two-dimensional mixing for DirectSound.
Demonstrates support for playback of multiple streams of PCM audio data.
Demonstrates support for a PCM audio format that is defined by the WAVEFORMATEXTENSIBLE structure.
A skeleton reference implementation of an audio adapter driver upon which the other msvad sample drivers are built.
Sound Blaster 16 sample. This sample implements an audio adapter driver for an SB-compatible adapter card on an ISA bus.
Standard IUnknown sample. Skeleton implementation of a standard IUnknown interface that conforms to the port class model for using COM in the kernel.
For details, see the readme documentation that accompanies each of these samples in the DDK.
To install the portion of the Windows DDK that contains the WDM audio driver samples, follow these instructions:
When setup completes, you will find the audio driver samples in the src\wdm\audio subdirectory under the main directory of your DDK installation.