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

Re: WASAPI shared output (foo_out_wasapis)

Reply #26

0.6 music break up when play DSD ! ! !

please fix it asap !

Re: WASAPI shared output (foo_out_wasapis)

Reply #27
I'll be busy at work for several hours so I can't take a look, but I'll attach version 0.5.8 here for anyone who needs to revert.

Re: WASAPI shared output (foo_out_wasapis)

Reply #28
I was afraid the changes in 0.6 could have side effects.

Old version resampled and downmixed the data as it was received from inputs so the entire output buffer was in the mixer format. That worked otherwise fine but when using the default output mode and the device changed during playback, the transition wasn't smooth. Old version actually discarded the currently buffered samples entirely and just started the buffering from current internal decode position.

The 0.6 version keeps buffered sampes as they were received and performs the resampling/downmixing just before playback. It worked fine in my tests but it is a way more processing time critical method.

I'll see if I can improve things.

Re: WASAPI shared output (foo_out_wasapis)

Reply #29
Hi @Case  maybe I am missing somthing but what separates your component from peters and which one should i be using?

Re: WASAPI shared output (foo_out_wasapis)

Reply #30
I've noticed a small bug: If you are playing a track and then pause it, there will be a pop if you start playing another track or seek somewhere in the track. There's no pop if you stop the track instead. This happened in 0.5.8 as well as 0.6 so it doesn't appear to be a regression at least.

Re: WASAPI shared output (foo_out_wasapis)

Reply #31
Hi @Case  maybe I am missing somthing but what separates your component from peters and which one should i be using?
The main technical difference is that the other WASAPI component takes full control of the output device. Nothing else can use the device while it's open in foobar2000. That also means the other WASAPI component can only play source material your sound card / DAC supports, unless you manually add the required DSPs to resample, downmix or upmix the signal to supported specs. My component automatically resamples the signal to sound card's chosen sample rate, downmixes channels when needed or pads missing channels with silence.

Another difference and the main reason I created the component are the added interpolation effects. Whenever signal changes suddenly - which happens if you pause or stop a track while it's playing or seek in a track - there's a pop sound. I hate those so my component tries to eliminate them. Similar effect can be heard while adjusting volume so the component interpolates volume adjustments too. The built-in DirectSound output has configurable fades that can eliminate the seeking pops but its stop fade doesn't fade audio fully (so it can make a pop) and it has no means to fix scratching sound while adjusting volume.

Some people use the exclusive WASAPI component to make sure the signal isn't resampled anywhere before the sound card. Proper resampling as done by foobar2000 DSPs is transparent (doesn't cause audible change) so audio quality wise this isn't necessary.

Some people use the exclusive component to make sure no other sounds can interfere with music. I have all operating system notification sounds turned off so I don't get unwanted interruptions from unexpected beeps. And I want to be able to watch a video clip or use voice chat while music is playing. If I don't want interruptions I don't do interrupting actions.

Only reason I'd use the exclusive WASAPI component would be to bitstream digital audio to external receiver for decoding. Though in my opinion doing that makes no sense as then you can't use ReplayGain, can't use any DSPs and can't control volume with foobar2000 or the operating system. Also without proper decoders you can't use Converter to transcode these files to other format.

So my recommendation would be to use the default DirectSound output unless you have a reason to use something else. If you think my WASAPI shared component offers smoother experience use it, if you think bit-perfect output to DAC is a must, use ASIO or WASAPI exclusive.

I've noticed a small bug: If you are playing a track and then pause it, there will be a pop if you start playing another track or seek somewhere in the track. There's no pop if you stop the track instead. This happened in 0.5.8 as well as 0.6 so it doesn't appear to be a regression at least.
Thanks, confirmed. Will need fixing.

Re: WASAPI shared output (foo_out_wasapis)

Reply #32
0.6 causes a cracking sound (for example, listen to Spain.ogg between 2:15 and 2:30), rolled back to 0.5.8

Re: WASAPI shared output (foo_out_wasapis)

Reply #33
I took down the 0.6 version from the component repository so people won't automatically update to it. So far I haven't managed to find the time to fix the issues.

Re: WASAPI shared output (foo_out_wasapis)

Reply #34
0.6 causes a cracking sound (for example, listen to Spain.ogg between 2:15 and 2:30), rolled back to 0.5.8
foobar2000 | Preferences | Advanced | Tools | Automatic resampling preference
Resampler (dBpoweramp/SSRC)
-> No cracking sound.
PPHS is not good.
(I do not know if this is a component bug or PPHS bug.)

Anyway, Windows's own resampler also does not have such a problem.
Please create an option to turn off automatic resampling.


Re: WASAPI shared output (foo_out_wasapis)

Reply #36
Please create an option to turn off automatic resampling.

Shared WASAPI without resampling? How?
I just saw it being in another player(potplayer). I do not know the technical part.
I can choose between shared and exclusive modes in the potaplayer's wasapi audio renderer and set it to shared mode(default).

Re: WASAPI shared output (foo_out_wasapis)

Reply #37
Shared WASAPI requires resampling if the mixer and source formats don't match. Otherwise the audio will play at wrong speed and pitch. I also interpret that screenshot of yours showing some resampler being active as the grayed out "Resample" field says "Always".

Re: WASAPI shared output (foo_out_wasapis)

Reply #38
Shared WASAPI requires resampling if the mixer and source formats don't match. Otherwise the audio will play at wrong speed and pitch. I also interpret that screenshot of yours showing some resampler being active as the grayed out "Resample" field says "Always".
greyed out = none available
Sample rate = target sample rate
Resample = resampling condition(always/when sample rate is smaller than/when sample rate is larger than)
Take a look at the items Input, Output and Rendering sample rate on the player screen.

Re: WASAPI shared output (foo_out_wasapis)

Reply #39
"Same as input" implies that it is changing the shared sample rate for the device, which also forces everything else on the system to resample to that rate, and can have jarring effects if you're changing the rate every time a different format file comes up for output.

Re: WASAPI shared output (foo_out_wasapis)

Reply #40
Maybe Potplayer simply has the same config dialog for both modes (shared and exclusive)? But some settings are only valid for exclusive mode, and have no effect on shared mode?

Re: WASAPI shared output (foo_out_wasapis)

Reply #41
New version with the seek-while-paused glitch fixed and buffering is back to the pre-resampled/pre-downmixed circular buffer.

Re: WASAPI shared output (foo_out_wasapis)

Reply #42
0.6.1 fixes the pop when seeking while paused, but there's still a pop if you pause a track then start playing another track (like by double-clicking it while the first track is still paused).

Re: WASAPI shared output (foo_out_wasapis)

Reply #43
Yeah same, If I pause the track and wait a second then play another it pops/glitches, but it seems like it's not every time.

Re: WASAPI shared output (foo_out_wasapis)

Reply #44
I actually saw that too but out of silliness didn't do anything. Will be fixed.

Re: WASAPI shared output (foo_out_wasapis)

Reply #45
I actually saw that too but out of silliness didn't do anything. Will be fixed.

Just giving you a nudge in case about the fix.

Re: WASAPI shared output (foo_out_wasapis)

Reply #46
I haven't forgotten it. Fixing it wasn't as simple as I had hoped and I consider the issue quite minor so haven't allocated the required time to get it done. But I'll be on a vacation soon which should provide plenty of spare time to get it done.

Re: WASAPI shared output (foo_out_wasapis)

Reply #47
Sometimes playback fails unexpectedly with error: "Unrecoverable playback error: WASAPI playback thread terminated". What could be the reason?
Magically yours
Raistlin

Re: WASAPI shared output (foo_out_wasapis)

Reply #48
Have you checked the foobar's console? It might report some additional error information.

Re: WASAPI shared output (foo_out_wasapis)

Reply #49
Code: [Select]
WASAPI (shared) PlayThread error: Received event to fill buffer but IAudioClient::GetCurrentPadding reported the buffer was still full during 70 ms of retrying
Unrecoverable playback error: WASAPI playback thread terminated
Magically yours
Raistlin

 
SimplePortal 1.0.0 RC1 © 2008-2019