Originally Posted by MrSinatra
just out of curiosity, what are the pros/cons of wasapi/directsound, and why was wasapi chosen as the primary?
Microsoft made the decision to change (6 or 7 years ago) because their research showed that a great deal of kernel crashes and support calls were related to the audio stack in XP and earlier OSes. Now audio problems (due to bad drivers or whatever) will not bring down the entire OS.
Back when processors were single core and slower, it was an advantage to offload audio chores to a co-processor (soundcard or chip). The DirectSound API also allowed game developers to enhance positional audio and other special effects which greatly added to the enjoyment of gaming on a PC. The bad effects of poorly written DS drivers were blamed on Microsoft instead of on the vendors who wrote them.
Now faster and multi-core processors are able to handle audio chores like any other software task, so low level hardware control is no longer needed. Another API called OpenAL can be used to support the positional audio and special effects that DirectSound provided. So changing audio tasks back to high level software lets Microsoft prevent the related OS crashes and shift the blame for problems back to the audio product vendors.
For standard stereo and mono sound, it takes a trained ear to hear any significant difference between WASAPI, DirectSound, and ASIO on a modern, good to high quality, system.
What follows is an excerpt from the following Wikipedia article:
Windows Vista/Windows 7
Windows Vista features a completely re-written audio stack based on the Universal Audio Architecture. Because of the architectural changes in the redesigned audio stack, a direct path from DirectSound to the audio drivers does not exist. DirectSound, DirectMusic and other APIs such as MME are emulated as WASAPI Session instances. DirectSound runs in emulation mode on the Microsoft software mixer. The emulator does not have hardware abstraction, so there is no hardware DirectSound acceleration, meaning hardware and software relying on DirectSound acceleration may have degraded performance. It's likely a supposed performance hit might not be noticeable, depending on the application and actual system hardware. In the case of hardware 3D audio effects played using DirectSound3D, they will not be playable; this also breaks compatibility with EAX extensions.
Third-party APIs such as ASIO and OpenAL are not affected by these architectural changes in Windows Vista, as they use IOCtl to interface directly with the audio driver . A solution for applications that wish to take advantage of hardware accelerated high-quality 3D positional audio is to use OpenAL. However, this only works if the manufacturer provides an OpenAL driver for their hardware.
As of 2007, a solution to re-enable hardware acceleration of DirectSound3D and Audio Effects, such as EAX, called Creative ALchemy was launched. Creative ALchemy intercepts calls to DirectSound3D and translates them into OpenAL calls to be processed by supported hardware such as Sound Blaster X-Fi and Sound Blaster Audigy. For software-based Creative audio solutions, ALchemy utilizes its built-in 3D audio engine without using OpenAL at all.
Realtek, a manufacturer of integrated HD audio codecs, has a product similar to ALchemy called 3D SoundBack. C-Media, a manufacturer of PC sound card chipsets, also has a solution called Xear3D EX, although it works instead by intercepting DirectSound3D calls transparently in the background without any user intervention.