Skip to main content
Topic: WASAPI shared output (foo_out_wasapis) (Read 10627 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.

 
SimplePortal 1.0.0 RC1 © 2008-2019