Possible to disable exclusive mode over WASAPI?

Hi all, I’d like to use HQ Player in shared WASAPI, and use EAPO to achieve bit perfect playback by bypassing windows APOs. I’m using HQPlayer 5 and there doesn’t seem to be an exclusive mode option.

This post is my inspiration for such a thing

HQPlayer uses exclusive mode whenever possible. Using shared mode for output would make HQPlayer’s point moot.

1 Like

What difference does shared mode make if you can bypass windows audio processing? Is there a startup argument I can pass to make it use wasapi in shared mode?

Shared mode by definition doesn’t bypass Windows audio processing. Only exclusive mode does.

Shared mode uses fixed output format and everything is converted from 32-bit floats to that single static output format. This is just like CoreAudio mixing mode on macOS.

I could ask, what point does shared mode make if you don’t want to screw up your audio output.

I’ll copy what I read from the forum I referred to as I believe it answers some of the questions you’ve asked.

Over time, pieces of the “Windows audio sucks” puzzle emerged, but never a complete picture:

  • Benchmark popularized that upsampling causes intersample-overs and clipping distortion within DAC chips. This is fixed by adding some Windows’ volume loss
  • Archimago showed that the Windows 10 upsampler (as of 2015) had significant performance issues. Avoiding the upsampler was the solution
  • Mathew Van Eerde showed that Windows has an embedded limiter (CAudioLimiter) that can cause distortion if the signal is near full scale. But I’ve seen no study on what to do about it. Was the limiter at the input of Windows audio engine, the output, or both? Do all sources needed to have volume reduced or would Windows’ global volume work? I decided to find out.

A commonplace sledge hammer detente is to just give up and use ASIO or WASAPI exclusive and bypass Windows’ audio engine all together, for bit perfect operation.

I was unhappy with this answer. I want better than bit perfect: a high performance digital filter engine to correct my room modes below Schroeder or to equalize (i.e. correct) my headphones regardless of what I was listening to, with Window’s ease of use for all my audio sources. The common recommendation was yet another sledgehammer: buy expensive external hardware filtering boxes (e.g. RME or miniDSP SHD).

This just seemed wrong to me, it felt like giving up. External hardware adds cost and ironically ties you to hardware with frequency resolution lower than Windows can deliver with a more convenient integrated free software solution like Equalizer APO. But how about the performance of EAPO, is it “good enough”? Again, an online search turned up no answers. So I decided to answer that too.

The first step was to find test signals that could be viewed as faultless, with self distortion well below 24 bits. After performing a large study of the free REW and Audacity’s tone generators (including trade off with bit rate and the performance of the various types of dither), I found their performance far outstripped even professional external hardware generators costing in the thousands (full disclosure, I used to work in an audio lab). As an example, this REW multi tone test stimulus (24 bit 44.1kHz with dither) was used in my measurements. Distortion components are >170 dB down. Ignore the noise floor, it has FFT gain, but it’s “way down there”.

Windows uses audio processing objects (APOs) to provide software based digital signal processing for it’s audio streams. First Surprise: Some hidden non defeatable APO made a mess of it, even with "all effects off’ in Windows. Naughty Windows! My music system and work PCs didn’t show this issue, so it may be caused by an APO for the Dell Realtek soundcard. To verify the measurement, I retested with RMAA’s spectrum analyzer and the tones at a lower level (to make sure it wasn’t intermediate clipping or the CAudioLimiter). Same outcome.

To try and fix this, I then installed (free) Equalizer APO (EAPO). This brilliant software supports a trouble shooting mode that turns off all “original” (stock) system APOs:

Result? Effective bit perfection through the Windows audio stack: first distortion component @ -170dB, per the source file:

Now, lets tackle CAudioLimiter. This is a level limiter built into the Windows audio stack that reduces the digital signal level if it approaches full scale. Benchmark and other sources have illustrated that such high signal level signals are not so uncommon in digital music files.

To test the CAudioLimiter, REW was used to generate a single test tone @ 0 dBFS, 24 bit. The first distortion component of the REW source tone is ~ -160 dB (again ignore noise floor due to FFT gain):

Using EAPO to set a pre-amp loss of 0.2 dB (loss with an input APO) completely avoids the CAudioLimiter. I think 150 dB dynamic range to the first distortion component should be good enough for even the fussiest audio junkie:

Lots of graphs and stuff…

If set up correctly, Windows can provide clean, faultless audio and (free) high performance equalization which provides enormous pleasure and fidelity improvement that I think any open minded audio fan could get behind. All with the performance and convenience beyond external costly hardware solutions.

Conclusion: Bitperfect playback is possible even with wasapi shared mode as evidenced in the post.

My end goal is to not have to fuss about when pausing my music to do anything else with my computer that uses audio.

All above is pointless from HQPlayer perspective.

And WASAPI in first place is fallback when ASIO is not available for some reason.

Remember that HQPlayer is the oversampling and delta-sigma modulation front-end for the final D/A conversion stage electronics. Plus it of course has all the EQ and such capabilities.

how is it pointless? What is the difference if the output is bitperfect reproduction of the input?

Shared mode converts output rate and format to the one set in Windows audio settings. And it also involves mixing with audio from other applications. Now combine that for example with DoP encoded DSD and you understand why it is really bad idea.

Ahhhh, yep, I see now. Well the way I use it I’m not 100% of the time doing active, deep listening. I listen to music at times when my mind isn’t laser focused on just the music, maybe I’m programming, studying, reading. In those times, while the highest fidelity would be great, I would probably not notice the difference between 384k and 192k. For my use case I can just use the hqplayer endpoint for more deliberate listening sessions and use asio or wasapi exclusive, and in the cases in which I’m not totally devoted to the music I can be fine with wasapi shared through roon