Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WASAPI shared output (foo_out_wasapis) (Read 40915 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: WASAPI shared output (foo_out_wasapis)

Reply #50
My fail safe code is terminating the playback thread as things look broken. The thread received an event that requested more data but even after retrying a few times the playback buffer had no room for new samples.

I attached a modified version that waits for about 0.5 seconds until erroring out if buffer stays full. I'd like to hear if this solves the issue.

Edit: attachment removed. Improved version of the change is included in the latest release.

Re: WASAPI shared output (foo_out_wasapis)

Reply #51
Thanks. I'll try it but, as the problem occurs rarely (say, one time per month), can't say for sure if it is fixed.
Magically yours
Raistlin

Re: WASAPI shared output (foo_out_wasapis)

Reply #52
This took longer than I'd have liked.

Attached is a new version I just finished which should fix all the transition glitches. I rewrote large parts of the functionality so I don't dare to upload it to the repository yet until I have had time to properly play with it. And hopefully some people here too can confirm that nothing got changed for the worse.

Edit: attachment removed. Version released properly now.

Re: WASAPI shared output (foo_out_wasapis)

Reply #53
With the new version, the sound stutters sometimes during the playback. I recorded the output via Line-In: https://mir.cr/XCVHPFMS https://mir.cr/18KWZGTW
Compare sound at 01:21.
Magically yours
Raistlin

Re: WASAPI shared output (foo_out_wasapis)

Reply #54
How reproducible is the issue? Can you try if the attached version solves it? I restored the false event handling to work almost identically with the prior version.

Edit: attachment removed. The fixed version is released.

Re: WASAPI shared output (foo_out_wasapis)

Reply #55
The issue is stable enough but appears each time at different time points. It seems to be gone with the new version. Thanks!
Magically yours
Raistlin

Re: WASAPI shared output (foo_out_wasapis)

Reply #56
Thanks for the quick confirmation. I released the fixed version for everyone.

Re: WASAPI shared output (foo_out_wasapis)

Reply #57
Hi. Love the component, but can you please allow fading to be changed? It doesn't even have to be where direct sound does it, or anything fancy, just maybe an ini/xml file which would allow you to change fading times.
I particularly have a problem with the fading on start because it alters the way the beginning of the audio sounds like, i.e., it fades in noticeably, and if I don't know the audio I'm listening to isn't supposed to do that, I might think that's how it really sounds like (which is exactly why I have the direct sound fade on start all the way down to 0).

Re: WASAPI shared output (foo_out_wasapis)

Reply #58
The fading is only enabled when you manually change from one track to another. If you allow track to change normally without user intervention you will hear all the samples. Or if you hit stop and then pick a track you will also bypass the fade.

Re: WASAPI shared output (foo_out_wasapis)

Reply #59
I do not get the behavior you described when stopping the playback and playing a track again; it still fades in (super obvious if a track starts with a kick/bass drum) (I'm using the latest version available through check updated components UI). I use a crossfader dsp to smoothly transition between tracks, so auto switching doesn't really help.
Also, not sure if there's anything you can do about this, but I have various dsp profiles with different dsp plugins, and when switching profiles, in certain situations the switch is a lot faster than direct sound (with 1k ms buffer), and at other times it seems as if the whole process hangs, it takes a while to switch, and unlike with direct sound where I can fast forward/rewind to force it to switch, with wasapi it doesn't let me do anything. Dsp's I normally use: EQ, crossfade, and Dolby headphone, and it seems as if resetting the profile from one with 2/3 plugins to a profile with none causes the hang.
I'm not sure how hard it'd be for you to allow changing the fading time, but It'd be very helpful if that were possible.
I really appreciate your great job with this plugin, these are just little things that bug me about it. :)

Re: WASAPI shared output (foo_out_wasapis)

Reply #60
I can't replicate any scenario where the process would appear frozen. I need more information about the files you play that trigger it (format, channel count, sample rate), which resampler is used (if any), and perhaps some more info about your DSP setup. In my test I used the bundled EQ and adjusted some sliders, enabled Dolby Headphone DSP with its default config and the bundled Crossfader with its default config.

But I did spot a downmix bug when the DSP toggling changed channel count on the fly. There was unwanted noise as resampler buffer got downmixed with an incorrect channel configuration. That issue is fixed in the freshly released version (0.6.4).

I'll attach a test file I use to verify that beginning of the audio isn't cut off or faded when it's not supposed to. The first sample is a dirac pulse and the rest of the file is silence. It makes a rather loud tick sound when played on its own and when fade in is active it's completely silent.

Re: WASAPI shared output (foo_out_wasapis)

Reply #61
I have tested the fading on start again, and you're right; it does not fade if I stop the playback and then play the file again, but it also sometimes produces a click that is not a part of the original audio. The dsp profile I use: built-in crossfade set to 10218 ms, and built-in equalizer with the first 3 parameters set to 70%. The freeze occurs when switching from the profile I described to the empty profile, i.e., when resetting the dsp chain.
As far as the format of the audio goes, it does that for everything (tried 96k 32 bit wave, 44.1k 16 bit mp3, etc.), and I do not use a resampler.
The freeze also occurs when switching from my other profile to an empty one (built-in channel mixer: 6 channels|surround mode|add low freqs, dolby headphone: live room, and built-in crossfade: 10218 ms).

Re: WASAPI shared output (foo_out_wasapis)

Reply #62
Thanks. I can replicate the UI freeze with those settings. But I can't replicate any playback glitching. Even tried running LinX to fully stress all the CPU cores but playback starts and runs smoothly.

Re: WASAPI shared output (foo_out_wasapis)

Reply #63
Sorry it took a while. Here's a new version that won't freeze the player UI anymore with the DSP change. I don't expect the change to break anything but just in case I'll initially offer the new version only here.

Edit: attachment removed. Fixed version released.

Re: WASAPI shared output (foo_out_wasapis)

Reply #64
Thanks! I can confirm it works properly now. Sorry for the belated reply. :)

Re: WASAPI shared output (foo_out_wasapis)

Reply #65
Surprised I didn't notice this before.  I can't get exclusive mode wasapi to work in the event mode with native Win 10 USB  2 support.  It needs either a manufacturers driver, or it runs fine in push mode.  This shared mode method works in the event mode and doesn't make so many entries in the output device window.

Resampling is a non issue as I am using the convolver to implement EQ at arbitrary frequencies.  Everything is already resampled to 96k.  CPU usage is super low.

Thanks.

Re: WASAPI shared output (foo_out_wasapis)

Reply #66
This is great!
I've recently got an external sound card and by using direct sound and exlusive wasapi output there were some popping sounds when stopping or switching songs. (not often tho but it used to happen). Currently I'm using this and no more popping sounds so far.
Thanks Case!
Somewhere, there's someone dying in a foreign land
Meanwhile, the world is crying stupidity of man
Tell me why, tell me why

Re: WASAPI shared output (foo_out_wasapis)

Reply #67
There seems to be some significant audio delay after switching to next track and immediately seeking somewhere in the middle of the track. Also the playback position in Waveform seekbar/minibar does not get immediately updated after switching to next track or starting the playback from stop. These issues doesn't happen with WASAPI push/event modes or DirectSound output, nor does the Buffer length have any affect on this delay.

Re: WASAPI shared output (foo_out_wasapis)

Reply #68
Are you using the latest version or the old one attached to this thread? I seem unable to replicate the issue with the current version. Though my "immediately" means I hit keyboard to switch to the next track and try to click mouse button to seek to the middle of the track simultaneously.

Re: WASAPI shared output (foo_out_wasapis)

Reply #69
Are you using the latest version or the old one attached to this thread? I seem unable to replicate the issue with the current version. Though my "immediately" means I hit keyboard to switch to the next track and try to click mouse button to seek to the middle of the track simultaneously.
0.6.8. It takes ~3 seconds after pressing next track when it actually seeks where I clicked.

Edit: Most of the tracks in my library seems to have this issue but not all, for example in one album I can start seeking right away with in 2 songs out of 11. This happens with both MP3 and FLAC files so it doesn't seem to be related to the file format.

 

Re: WASAPI shared output (foo_out_wasapis)

Reply #70
I don't have such issues with 0.6.8, but would like to have configurable fade support, like the DS output. I use your output mainly due to DS's forced limiter behavior.

Re: WASAPI shared output (foo_out_wasapis)

Reply #71
It is strange that no one writes that the sound became quieter with this wasapi. WASAPI shared is playing about 2 times quieter than on other outputs (e.g. wasapi event, ds). Sound card ZxR, Windows 10 with latest updates.

Re: WASAPI shared output (foo_out_wasapis)

Reply #72
Volume issue was mentioned in the early posts. Since my component doesn't touch Windows mixer fixing its level has to be done by the user. Just slide foobar2000's volume to max in mixer and you're done.

Re: WASAPI shared output (foo_out_wasapis)

Reply #73
Tin. And what should I correct her every time? The fact is that I often change the volume in the Foobar and the main volume is also not at my maximum, I also change it often.

Re: WASAPI shared output (foo_out_wasapis)

Reply #74
There seems to be some confusion. You are free to touch Windows's volume control and it will work like it has always worked. You only need to adjust the per-application mixer for foobar2000 once. If you stick with this WASAPI output component that mixer setting will remain where it is. You don't even need to touch it manually - you can switch to DS output, set foobar's volume to max, switch back and you're good to go.