Skip to main content
Topic: WASAPI shared output (foo_out_wasapis) (Read 5596 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WASAPI shared output (foo_out_wasapis)

There's a bug in v0.4: if 2 audio devices are present WASAPI output will always use one of them - even if another one is selected.
I have Realtek HDA and Creative Audigy 4. I select WASAPI output for Creative but the sound is going from Realtek HDA. See the attached file.
Magically yours
Raistlin

Re: WASAPI shared output (foo_out_wasapis)

Reply #1
Thanks, I was using wrong GUID to ID devices but with my setup I see no problems. Can you verify on your system if this version can differentiate between the devices?

Edit: attachment removed. The fixed version is now properly released.

Re: WASAPI shared output (foo_out_wasapis)

Reply #2
The new version works correctly, thanks.

In comparison to WASAPI output support 3.3 plugin, yours has less options to setup so I have a few questions:
1. What output data format does it use?
2. What mode does it work in - push or event?
3. What does "shared" mean in the names of output devices?
Magically yours
Raistlin

Re: WASAPI shared output (foo_out_wasapis)

Reply #3
1. It uses 32-bit floating point at the sample rate and channel count configured for your device. The component will automatically resample and downmix channels if needed.
2. Event.
3. It's the opposite of Exclusive mode. There can be only one exclusive mode WASAPI session open on a device and all other sound sessions are blocked. Shared mode allows multiple sessions to share the device, they just need to take care to output sound at the format the mixer is configured for.

Re: WASAPI shared output (foo_out_wasapis)

Reply #4
Thank you for this component, much appreciated. I use it since v0.5.2 without any issues. On my configuration, it uses significantly less cpu cycles than dsound during playback when no SRC is necessary.

"the component will automatically resample.." here I have a question, does it SRC by itself or it uses fb2k resampling service so that it can use sox plugin when installed? I figured out, it probably doesn't use media foundation resampler (resampledmo.dll) used by windows build-in apps, which is btw. extremely fast and transparent.

Re: WASAPI shared output (foo_out_wasapis)

Reply #5
It uses foobar2000 resampling service. If you want to make sure SoX gets picked go to Preferences -> Advanced -> Tools and enter "Resampler (SoX)" under "Automatic resampling preference".

Re: WASAPI shared output (foo_out_wasapis)

Reply #6
Great, thank you Case. Frankly, i don't know the benefits of dsound over this output component on W7up systems other than fading settings. Regarding WXP market share, dsound support could be provided as plugin and this one should be build-in..
But I understand the dsound support still provides "safe" like solution how to provide shared audio stream for the engine for most configurations. However, your component proved it's better for W7up sound driver support, at least according to my experience. 

Re: WASAPI shared output (foo_out_wasapis)

Reply #7
Hello,
it looks this component does not bypass Windows soundmixer ?
If I change settings on windows sound like echo, loudness etc Foobar sound with Wasapi shared is impacted whereas there is no change with he classic Wasapi exclusive component
Does that mean that only Wasapi in exclusive mode can bypass Windows soundmixer ?
If yes what is the advantage using Wasapi shared compared to DS ?

Re: WASAPI shared output (foo_out_wasapis)

Reply #8
Does that mean that only Wasapi in exclusive mode can bypass Windows soundmixer ?
If yes what is the advantage using Wasapi shared compared to DS ?

foo_out_wasapis does its own resampling and channel downmixing as needed.

Advantage of foo_out_wasapis over DS: "This component tries to provide smoother volume adjustment and seek/pause/stop transitions than existing outputs." (https://www.foobar2000.org/components/view/foo_out_wasapis)


Re: WASAPI shared output (foo_out_wasapis)

Reply #9
Here's a simple test file that should show the smoother transitions in effect. Play the file with various outputs and adjust volume/seek in the track and compare how much clicks and pops you hear. Same issues are present in regular music but may not be as easy to hear all the time.

Re: WASAPI shared output (foo_out_wasapis)

Reply #10
@Case, will you be adding fading effects in Wasapi shared mode just like DS? Thanks.

Re: WASAPI shared output (foo_out_wasapis)

Reply #11
I have no plans to add additional configuration. The fades the component does now are all as short as possible and only done because without them there could be loud glitches that don't belong in the original signal. Also a regular DSP could not be used to achieve them. Other than that I believe output component should play all samples that come from the source. If further fades are desired they can be handled with a DSP component.

Re: WASAPI shared output (foo_out_wasapis)

Reply #12
Thanks for the component and I installed and tested with the sine wave provided.

However, the Meier crossfeed seemed not functioning as with DS using music tracks.

Re: WASAPI shared output (foo_out_wasapis)

Reply #13
DSP components do not depend on output method. Remember that Meier crossfeed effect is very subtle. Try comparing the lowest strength against the maximum and you should see that it does work with this WASAPI output too.

Re: WASAPI shared output (foo_out_wasapis)

Reply #14
Is it possible that DS sounds louder than ASAPI?
I tested without changing volume, just the driver at the page of Playback|output.

Re: WASAPI shared output (foo_out_wasapis)

Reply #15
If you didn't have foobar2000 volume at maximum that does happen. The default outputs synchronize their volume with Windows mixer and the OS remembers what the mixer was previously set to. My component does all volume adjusting itself and doesn't touch the OS mixer, so old settings cause the volume to be lowered twice. You can safely open the Windows' volume mixer and drag the player's volume to maximum.

There are two benefits for not using the OS mixer: one is the ability to interpolate adjustment steps to prevent noises and the second is ability to bypass limiter when it wouldn't be needed.

Re: WASAPI shared output (foo_out_wasapis)

Reply #16
Thanks a lot for explaining the volume related issues. I'll use it from now on...

Re: WASAPI shared output (foo_out_wasapis)

Reply #17
I've bought a MQA album from highresaudio.com, set up foobar2000 with WASAPI(http://foobar2000.org/components/view/foo_out_wasapi + http://foobar2000.org/components/view/foo_out_wasapis).

When I play a track from the album with foo_out_wasapi set to either WASAPI event or push, my Dragonfly Red led lights up Blue.
When I play a track from the album with foo_out_wasapis set to either WASAPI (shared), my Dragonfly Red led lights up Green.

DragonFly Red 1.0’s LED lights up in different colors to indicate status or sample rate:
Red: Standby
Green: 44100 Hz
Blue: 48000 Hz
Amber: 88200 Hz
Magenta: 96000 Hz

When I play the same album in Roon, led lights up Magenta.
I love to be able to play my MQA files in max. quality available with foobar2k though.

Re: WASAPI shared output (foo_out_wasapis)

Reply #18
If someone reverse engineers the MQA format and releases a usable decoder library you can get foobar2000 to behave like Roon too.

If you wonder the difference between the two WASAPI components, this shared one uses the mixer format you have configured in Windows for your sound interface. The other WASAPI component forces the device to use the same format as the source.

Re: WASAPI shared output (foo_out_wasapis)

Reply #19
Ah, so foobar2000 actually misses a software decoder to unfold the 1st level of MQA.
Fun-factor: With your foo_out_wasapis, I'm now able to play the bought MQA FLAC file in foobar2000, while led lights up Magenta, by indeed, preconfigure the Dragonfly Red in Windows to play at 24-bit/96khz.

But this means it not doing any unfolding though, right?


Re: WASAPI shared output (foo_out_wasapis)

Reply #20
Correct. You're just resampling the 44100Hz signal up without any further processing.

Re: WASAPI shared output (foo_out_wasapis)

Reply #21
A suggestion/issue.

When using Default, say Bluetooth headphones set to Default audio device, once it's disconnected it falls back to Speakers, the new Default, which is expected. When the headphones reconnect and are the Default again, it continues using the Speakers. Is it feasible to detect this and switch back to headphones?

Thanks.

Re: WASAPI shared output (foo_out_wasapis)

Reply #22
It's certainly possible and I have been thinking about it. I'll keep your request in mind.

Re: WASAPI shared output (foo_out_wasapis)

Reply #23
Feature implemented in v0.5.5.


 
SimplePortal 1.0.0 RC1 © 2008-2019