Audio stack architecture
Applications communicate with the audio driver through Sessions, and these Sessions are programmed through the Windows Audio Session API (WASAPI). In general, WASAPI operates in two modes. In exclusive mode (also called DMA mode), unmixed audio streams are rendered directly to the audio adapter and no other application's audio will play and signal processing has no effect. Exclusive mode is useful for applications that demand the least amount of intermediate processing of the audio data or those that want to output compressed audio data such as Dolby Digital, DTS or WMA Pro over S/PDIF. WASAPI exclusive mode is similar to kernel streaming in function, but no kernel mode programming is required. In shared mode, audio streams are rendered by the application and optionally applied per-stream audio effects known as Local Effects (LFX) (such as per-session volume control). Then the streams are mixed by the global audio engine, where a set of global audio effects (GFX) may be applied. Finally, they're rendered on the audio device.
The higher level APIs such as the Wavexxx APIs and DirectSound use shared mode, which results in pre-mixed PCM audio that is sent to the driver in a single format (in terms of sample rate, bit depth and channel count). This format is configurable by the end user through Control Panel.
After passing through WASAPI, all host-based audio processing, including custom audio processing, can take place (sample rate conversion, mixing, effects). Host-based processing modules are referred to as Audio Processing Objects, or APOs. All these components operate in user mode. The only portion of this architecture that runs in kernel mode is the audio driver (which contains the Port Class driver, the vendor Miniport driver and the vendor HAL). The Windows Kernel Mixer (KMixer) is completely gone. There is no direct path from DirectSound to the audio drivers; DirectSound and MME are emulated as Session instances. Since the whole point of DirectSound acceleration is to allow hardware to process unmixed audio content, DirectSound cannot be accelerated in this audio model. APIs such as ASIO and OpenAL are not affected.