Previous Next

Audio Filter Graphs

An audio filter graph is a collection of audio filters that have been connected together to process one or more audio data streams. For example, the following figure is a simplified diagram of a graph that performs audio rendering and capture.

Simple Filter Graph for Rendering and Capture

The port/miniport wave filter is implemented by binding a miniport driver to a port driver. The filter represents a hardware device in an audio adapter. The preceding figure shows a device that can both render and capture wave streams.

On the left side of the figure, the audio stream from a DirectSound or waveOut application (top) plays through a speaker (bottom). On the right side, a DirectSound or waveIn application (top) records the stream that is input from a microphone (bottom). In both cases, an instance of KMixer, the kernel mixer (see KMixer System Driver), is interposed between the wave filter and the application.

KMixer is a versatile software filter that can readily convert between a variety of audio formats and sample rates at its source and sink pins. KMixer can typically accommodate the differences between the stream format that the hardware is configured for and the stream format that the application expects.

At the bottom of the figure, the source pin that drives the speaker and the sink pin that receives the microphone signal are both labeled as bridge pins. A bridge pin represents a hardwired connection on an audio adapter card. One distinguishing characteristic of a bridge pin is that you cannot send IRPs to it (although you can query a filter for the KSPROPSETID_Pin properties of its bridge pin). The signal that enters or leaves a bridge pin can be either analog or digital. In the preceding figure, the bridge pin on the left transmits the output signal from a DAC (digital-to-analog converter), which drives a speaker. The bridge pin on the right receives the signal from a microphone, which enters an ADC (analog-to-digital converter).