From time to time people ask about the reasons PortAudio is implemented the way it is on Windows. This page doesn't try to answer that question, but it does outline some of the non-obvious issues and provides links to more information. Please contribute if you know something that isn't here.

Note that the titles of articles are used as the link text, so if there's a broken link you can try googling for the text in the link name.

For a user-level view of WDM and kernel mixer issues check out the Windows Driver Model section of thisPC Notes column of Sound on Sound magazine.

There is a nice discussion of changes to the Windows Audio Architecture under Vista Creative Labs description of Vista audio architecture. This is a good place to start as it reviews the architecture under Windows XP also. Although PortAudio needs to run on more than just the latest versions on Windows, Microsoft's Audio Device Technologies for Windows page has lots of information about current generation systems. See also the white paper Microsoft Device Driver Interface for HD Audio

Microsoft's overview of WAVE_FORMAT_EXTENSIBLE Multiple Channel Audio Data and WAVE Files is especially relevant for multichannel and high-bit-depth support. See also The evolution of a data structure - the WAVEFORMAT

WDM is the driver model for Windows audio device drivers in current versions of Windows. API's like WMME, DirectSound? and WASAPI are implemented on top of WDM/KS (Kernel Streaming) but you can also talk to WDM directly from user space. WDM Audio Architecture: Basic Concepts

PortAudio provides a (mostly working) WDM/KS implementation, but it also uses some WDM facilities to query driver channel count in the DirectSound? and WMME versions (since the Kernel Mixer will usually return ((short)-1) as the number of supported channels rather than what the driver reports.

Our WASAPI version doesn't work too well because of a bug in Vista: Exclusive mode event-driven render across WOW64 is broken in Vista RTM. All event-driven capture is broken in Vista RTM.