WASAPI

Vista has a completely new audio mixing engine, so WASAPI gives you the chance to plug directly into it rather than going through a layer of abstraction. The reasons for the new audio engine are:

  • A move to 32 bit floating point rather than 16 bit, which greatly improves audio quality when dealing with multiple audio streams or effects.
  • A move from kernel mode into user mode in a bid to increase system stability (bad drivers can't take the system down).
  • The concept of endpoints rather than audio devices - making it easier for Windows users to send sounds to "headphones" or record sound from "microphone" rather than requiring them to know technical details about the soundcard's installed on their system
  • Grouping audio streams. In Vista, you can group together all audio streams out of a single application and control their volume separately. In other words, a per-application volume control. This is a bit more involved than might be at first thought, because some applications such as IE host all kinds of processes and plugins that all play sound in their own way.
  • Support pro audio applications which needed to be as close to the metal as possible, and keep latency to a bare minimum. (see Larry Osterman's Where does WASAPI fit in the big multimedia API picture?)

Source: Mark .Net

A sound card can only play at 1 sample rate at the time.
If you have your music playing and another application kicks in, a system sound, a VOIP call, audio embedded in a web page, etc, all streams must be converted to the same sample rate.
Likewise, if you play a CD but your sound card only supports 48 kHz (the cheap ones do), sample rate conversion must be applied (otherwise it will sound like a 33 rpm record played at 45).
This is the task of the Windows audio engine.


WASAPI in exclusive mode bypasses the audio engine.

As it is exclusive mode, no other application can use the sound card.

 

WASAPI communicates straight with the audio device.
What your media player sends to WASAPI must match the capabilities of the audio device in terms of bit depth and sample rate.
If this is not the case it is silence or the program using WASAPI has to do the SRC (sample rate conversion).
Check if the SRC implemented by this program is an improvement compared with the SRC provided by Windows because writing a good SRC is not trivial.

 

Using WASAPI requires a media player supporting this driver.

You might have to configure the audio device too.