How to return high-quality sound in Windows 7 - bitwise output, hardware effects (EAX, etc.)
I want to share experience on the topic of sound in Windows 7. In fact, everything is not as bad as it first seems, and I'll show it to you now. I'll start over.
About audio subsystems
Windows xp
Here the sound subsystem diagram is approximately as follows:
')
In this case, through the DirectSound interface, the software had direct access to the hardware resources of the sound card — mixing, sample rate conversion, various effects (including 3D positioning) —in general, everything that was necessary, both for music / movies and games. Of course, there were some problems, in particular, with a Windows mixer (inaccurate volume control, forced poor-quality oversampling of everything and everyone to 48 kHz), but they were quite easily managed with Kernel Streaming (the same stream going by kmixer), and sometimes with the help of good drivers (for Creative, for example, those appear only in the X-Fi line. On the Audigy audio cards, the mixer behaves not quite adequately, but, if desired, it is not difficult to cope with this).
Vista seven
And so, our enthusiasts zvuvri lived, did not know grief, but then a new OS from Microsoft arrived, which of course had to contain dramatic changes (and it’s not so important which way). Thus, within the framework of the new concept of abstraction from equipment , Windows Vista, among other things, received a completely redesigned audio input / output subsystem. And of course, reworked it is not the best way. This is what she looked like this time:
API - Application Programming Interface APO - Audio Processing Object CPT - Cross Process Transport KST - Kernel Streaming Transport
Now I will explain. The bottom line is this: all programs sharpened for output to DirectSound and unaware of the new interface are connected to WASAPI in general mode (WASAPI Shared), then the following happens: The components of WASAPI (using only CPU resources) perform all the necessary (and not so) transformations:
Bringing audio streams from different applications to the same type (specified in the Windows settings) - i.e. to one number of channels, sampling rate, quantization depth.
Mixing streams.
Plus, it is necessary to add the possibility of imposing in the process of processing software effects (the algorithms of which are incorporated in the sound card drivers). For example, for Creative X-Fi sound cards, there is a poor emulation of the CMSS-3D effect. The quality of all these handlers, of course, is not the highest. Further, all this is sent via Kernel Transport to the sound card. Now let's try to objectively evaluate the advantages and disadvantages of the new system:
+ Basic processing capabilities for sound cards that do not know how to handle the sound "on their own" + input support for almost any audio format - multi-channel audio with a sampling rate of up to 192 kHz and a quantization depth of up to 32-bit float + increased stability (controversial statement, in principle)
- forced resampling of dubious quality - mixing channels without environmental effects (or they are very primitive) - narrowing the dynamic range (especially in 16 bit mode) - lack of access to hardware DSP, i.e. loss of all its functionality, including the effects of EAX in games (including on the cards where EAX was emulated programmatically - since there is no such thing in WASAPI) - clicks, wheezing and other consequences associated with the use of CPU resources.
As you can see, most unlucky computer music lovers are audiophiles (I hope no one will be offended) and gamers. People who are not particularly interested in what is happening with the sound on the way to the sound card may even get a certain improvement (although, again, they probably don't care if they only work) And now, about how to overcome most of the above problems, because, to the great misfortune, with the release of the beloved by many Windows 7, Microsoft didn’t make any revolution in terms of sound.
Music lovers: accurate sound output
1. As I wrote above, most applications for audio output in Windows 7 (whether they want it or not) use WASAPI Shared mode. But there is another mode - WASAPI Exclusive. If you follow the block diagram, then in this mode everything that lies between the Application Programming Interface and the Kernel Streaming Transport is discarded - roughly speaking, the sound goes directly from the application through the WASAPI interface to the sound card. But it is necessary to make a note : since the WASAPI mixer is turned off in this mode, and there is still no access to the sound card mixer (for there is no DirectSound), when the application uses exclusive mode, playback of any other source via WASAPI becomes impossible. But, anyway, we get a bit-by-bit audio output to the sound card.
2. There is another way. If your sound card has a native ASIO driver, you are very lucky. ASIO functions completely separate from WASAPI, so that when listening to music, the system sounds will not be turned off - the ASIO and WASAPI streams will be mixed by the sound card itself. Conclusion: if your ASIO driver is beyond doubt, use it. Yes, I almost forgot - it is undesirable to use ASIO4ALL - like Kernel Streaming, it is very unstable in this OS (apparently, due to the fact that other sounds coming through WASAPI periodically block Kernel Transport).
Now directly to the point .
Of course, for listening to music, I recommend foobar2000 with ASIO Output plug-in or WASAPI output support - I cannot vouch for anything else. Detailed settings for audio output through foobar2000 are described here .
I’m disappointing AIMP lovers - WASAPI Exclusive is not supposed even in AIMP3 beta (Shared only), and ASIO is still lame in it (it doesn’t know how to set the correct number of output channels, which leads to bad results).
Winamp users can offer ASIO output Plugin plug-ins or even this: OpenAL Output - by the way, another way to bypass WASAPI (as seen from the block scheme).
For film enthusiasts: about video players
With video players, the situation is almost the same. We need to bring sound to the card in its original form. This is especially important if you want to convert multi-channel sound to stereo using hardware effects like CMSS-3D to Creative X-Fi (surround sound in headphones or stereo speakers). To do this, the sound must come to the sound card in a multi-channel form. But here's the problem: WASAPI in general mode converts channels to the number specified in the Windows settings. But even if you specify there, say, 5.1, - this parameter is synchronized with the sound card driver settings, and the DSP will not convert the sound - since the signal at the input corresponds to the number of channels settings. Those. Here the principle is as follows: in the sound card driver settings there should be the actual configuration of the connected playback device (headphones, speakers), and the sound should be not changed to the card. And so, here we again need WASAPI Exclusive. I would advise using Media Player Classic HomeCinema in conjunction with DirectShow ReClock filter (only for 32-bit MPC), which, among other things, can output sound to WASAPI Exclusive.
Gamers: three-dimensional positioning, EAX
Yes, the introduction of a new sound subsystem, undoubtedly, caused outrage among many gamers, including Happy owners of high-tech sound cards from Creative. And so, for those who, maybe, still do not know: the way out is found - OpenAL. This library has access to everything related to hardware effects, three-dimensional positioning of sound sources, and so on. Environmental Audio Extension - up to version 5.0. In addition, advanced developers of such games, such as STALKER: Call of Pripyat, built the engines of their games on OpenAL, for the other games designed for DirectSound, two programs were developed that convert DirectSound calls to OpenAL:
Creative ALchemy (the latest version at the time of this writing) for Creative'sAudigy and X-Fi cards
and even 3D SoundBack for Realtek HDA cards, which, by the way, support EAX 2.0 (albeit programmatically)
findings
And so, it seems that we have everything that we lacked right after the transition from Windows XP to Windows 7. Of course, not without much hassle, but what to do - Microsoft has thrown up such puzzles to us.