Drivers

A (device) driver is a piece of software allowing other programs to communicate with a device without having specific knowledge of this device.
If you print a document, the device driver of the printer translates the incoming stream into something the printer understands.

In case of audio, it is no different.
A media player doesn’t know every possible sound card.
The driver of the sound card takes care of the specifics.

In case of computer audio drivers like WASAPI or ASIO are deliberately chosen to bypass parts of the audio system of the operating system.
This in general results in lower latency, a bit perfect path and automatic sample rate switching.

Audio drivers

A sound card driver provides the communication interface between an application and the audio system hardware. In general it is hardware-specific and/or is compatible with a standard like ASIO or Microsoft's Universal Audio Architecture.

Bypassing XP audio using a ASIO driver or Kernel Streaming is a common practice to circumvent the XP K-mixer.

 

From Vista on WASAPI is often used to bypass the audio engine (the mixer).

It depends on your media player if you are able to choose a specific driver.

Players like iTunes and WMP don't offer these options.

Some drivers simply don't deliver bit perfect output.

The latter applies to the C-Media based soundcard's: while the hardware is fully capable of bit perfect playback at a multitude of sample rates, all versions of the official driver process the sound. Some versions even cripple the sample size of the sound data from regular 16 bit down to 14 bit which results in a hefty loss of dynamic range (roughly estimated from 96dB/16 bit to 84dB/14 bit).

Source: DogBer1

Obvious drivers can have their impact on sound quality.

 

When using playback software with native EMU ASIO support (Wavelab, Cubase, Reaper, JRiver Media Center, Foobar with ASIO Plug-In), I got bit perfect true data. With these software I got jitter values of random nature with approximately 2.5 ps. In this case, it doesn't matter which software I using, they all deliver nearly the same results and the difference between two measurements is in the same range as between the different software.

When using playback software that uses direct sound output (Winamp, Media Monkey), the digital data is shifted one bit into the LSB direction (just one bit, not one byte), so I receive no longer a 1:1 bit true data (but this is a different story). When I then measure the jitter a will receive the same amount of random jitter with approximately 2.5 ps, but relatively high discrete jitter with about 10 ps. (when I compare a DAC output with this two different digitals, than the direct sound output with the higher discrete jitter delivers much more worse analog out as the random jitter).

When using a playback software with wave out (Winamp, Media Monkey), I also get no bit perfect true data, because the wave driver add some dither to the signal. It is “only” a dither at the 24.th bit, but compare to only toggling the 24.th bit, it really being added to the signal, so a get a different signal with a slightly lower resolution. When I then measure the jitter, I will receive a random jitter of approximately 3.5 ps without discrete jitter frequencies.

Juergen

ASIO or WASAPI

Both deliver bit perfect output to the audio device.
As ASIO is a proprietary protocol either your audio device supports it or not.
In the latter case of course you can’t use it.
WASAPI in general works nice with USB DACs. It does automatic sample rate switching.
In case of  WASAPI and discrete sound cards, automatic sample rate switching is often not working.

 

A well-behaved ASIO driver will deliver the same bitperfect stream as a functioning WASAPI exclusive connection, but ASIO may do so at lower latency and with certain other advantages (some cards only support sample rate switching with ASIO, not WASAPI).  If an ASIO driver is working correctly it should sound identical to WASAPI (because both are bitperfect and both bypass the windows mixer).  Because both should sound the same and ASIO may sometimes offer technical advantages, the recommendation is to use ASIO if your ASIO driver works well.

Some ASIO drivers are not well-behaved, but it's generally pretty obvious when that happens; you'll hear static and dropouts and other flakiness, etc. with a bad ASIO driver.  But it's not as though WASAPI is immune to those problems; I've had sound cards where WASAPI output caused pops and crackles with any buffer settings, but the ASIO output was smooth as silk.  It really depends to a large extent on your specific device and how well its drivers work.  But what I'm describing is not subtle, it's generally pretty obvious when a driver is malfunctioning: if you're not hearing obvious drop outs or distortion, it's very likely that either method will provide the same bitperfect output (you can test for yourself if you're concerned).  

As to whether bypassing the windows mixer is an advantage or not, I suppose it depends on whether you listen to music with more than one sample rate.  The windows mixer resamples all audio to the same fixed rate, and it's resampler isn't a particularly good one (and can introduce audible artifacts).  You can change what the target sample rate is, but that's time consuming and you have to remember to do it before, say, watching a movie which typically has a different sample rate than CD music, etc.  ASIO and WASAPI exclusive also generally prevent system sounds from intruding on music, which I consider a big enough advantage on its own even if windows' resampling engine was perfect in every way.

For my part, I can't personally (in a blind test) consistently distinguish a bitperfect output from an output that's passed through the windows mixer (except in the case of a malfunctioning driver), but some folks can reliably hear a difference (especially when resampling is involved).  Bitperfect output is a "motherhood and apple pie" kind of issue; it's free to do and it's nice to know that your soundcard is getting exactly what was originally included in the music without unintended processing.

To summarize, what is "standing in the way of consensus" is that WASAPI exclusive and ASIO (when working correctly) deliver identical outputs so one cannot be clearly better than the other in terms of sound quality (although ASIO sometimes offers other technical advantages).  But because device drivers vary in quality, the two output methods do not always work identically and the answer of which is better in any specific case depends on the device and it's drivers and cannot be answered in the abstract. 

mwillems