Sample Audio Drivers

The Microsoft Windows Driver Kit (WDK) includes a number of sample audio drivers 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 custom driver for a proprietary audio device.

The WDK contains the following sample audio drivers:

  • Microsoft Virtual Audio Device Driver Sample (Msvad)

    The Microsoft Virtual Audio Device sample 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:

    • Ac3

      Demonstrates support for a non-PCM audio data format.

    • Drmmult

      Demonstrates support for multiple-stream audio with SAP-protected content. For information about Secure Audio Path (SAP), see the Microsoft Windows SDK documentation.

    • Drmsimp

      Demonstrates support for a single audio stream with SAP-protected content.

    • Ds2dhw

      Demonstrates support for hardware-accelerated two-dimensional mixing for DirectSound.

    • Multstr

      Demonstrates support for playback of multiple streams of PCM audio data.

    • Pcmex

      Demonstrates support for a PCM audio format that is defined by the WAVEFORMATEXTENSIBLE structure.

    • Simple

      A skeleton reference implementation of an audio adapter driver upon which the other Msvad sample drivers are built.

  • Microsoft Slate System Virtual Audio Device Driver Sample (SYSVAD)

    • SlateAudioSample

      The Microsoft Slate Virtual Audio Device Driver SlateAudioSample project demonstrates how to develop a WDM audio driver that exposes support for multiple audio devices. Some of these audio devices are embedded (speakers, mic arrays) in the system while others are pluggable (headphone speaker/mic, Bluetooth headsets speaker/mic). The driver uses WaveRT and audio offloading for rendering devices. The driver uses a "virtual audio device" instead of an actual hardware-based adapter and highlights the different aspects of the audio offloading WDM audio driver architecture. For more information about the Windows audio engine, see Hardware-Offloaded Audio Processing (Windows Drivers), and note that audio hardware that is offload-capable replicates the architecture that is presented in the diagram shown in the topic.

    • SwapAPO

      The Microsoft Slate Virtual Audio Device Driver SwapAPO project demonstrates how to develop audio processing objects. It includes sample code that demonstrates how to register and unregister audio processing objects, and also shows how to customize a Control Panel property page to reflect the available features in the processing object. The sample applies to both local effects (LFX) and global effects (GFX) audio processing objects. For more information, see System Effects Audio Processing Objects.

  • AC97 Driver (Ac97)

    The AC97 Driver is 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:

    • Cpl

      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.

    • Driver

      This is the sample audio driver for the AC97 controller.

    • Infviewer

      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.

    • Proppage

      This sample shows how to write a property-page DLL that gets loaded by Device Manager when a user elects to display the properties of your device. In addition to displaying the default property sheets, Device Manager also displays the property sheet that is defined in the sample. This sample DLL requires that the Ac97 sample driver be installed.

  • DirectMusic UART Driver Sample (Dmusuart)

    The DirectMusic UART Driver Sample contains code for a 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 (see PcNewMiniport). Hardware vendors can adapt this sample to write their own custom miniport drivers.

  • DirectMusic Software Synthesizer Sample (ddksynth)

    This sample contains sample code for a kernel-mode software synthesizer that plugs into the Microsoft® DirectMusic® and WDM Audio architectures. You can use this sample code to start building your own software synthesizer, and then modify the sample to add your own features.

  • FM Synthesizer (Fmsynth)

    The FM Synthesizer is a 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 (see PcNewMiniport). Hardware vendors can adapt this sample to write their own custom miniport drivers. This sample runs only in 32-bit versions of Windows.

  • Audio Adapters Samples
    • Mpu401

      Mpu401 is a 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 (see PcNewMiniport).

    • Stdunk

      Stdunk is a standard IUnknown COM sample. Skeleton implementation of a standard IUnknown interface that conforms to the port class conventions for using COM in the kernel.

Audio Processing Codec Samples

These audio processing samples are also available for download.

  • Msgsm610 Sample Codec (gsm610)

    The Msgsm610 sample implements a software codec that performs speech compression on a digital audio stream that contains voice content.

  • Msfilter Sample Codec (MsFilter)

    The Msfilter codec sample provides routines for volume and echo effects that you can apply to any audio content.

For details, see the readme documentation that accompanies each of these samples in the WDK.

For information on the WDK samples, see Windows Driver Kit Samples Pack (Windows Drivers).



Send comments about this topic to Microsoft

© 2015 Microsoft