[1412] WASAPI Exclusive Mode [#8294]

Beta Testing for Windows Products and plugins

Moderator: Gurus

colazivi
Posts: 1
Joined: Sun Jul 24, 2011 4:28 pm

[1412] WASAPI Exclusive Mode [#8294]

Post by colazivi » Sun Jul 24, 2011 5:15 pm

1) My Setup:

Windows 7 64bit
External USB-DAC (Yulong U100)

2) Steps to reproduce the problem

Mediamonkey Settings:

Use wasapi output plugin (directsound works just fine)
set exclusive mode (this is crucial for this error.. without exclusive mode everything's working as expected)
set 44khz / 16 bit ( I actually tried other settings there as well... with 48khz it gets even worse)


Input file: doesn't matter (I tried 44khz flacs and 128kbit/s mp3s)

Reproducible: Always

1.) Start playback of any file you wish.
-> Everything sounds as expected
2.) Press pause
-> The sound stops... ;D
3.) Resume playback
-> Playback resumes, but overall the speed of the playback is veeeery slow and everything gets extremely distorted. It's hard to describe, but it sounds like every single beat just lasts three times as long as normal, so the sound is totally unlistenable to.
Interestingly setting the output format to 48khz for testing purposes seems to make the sound even slower (but I can't really tell for sure).

When MM4 is restarted, everything sounds normal again (unless you press pause of course). Switching between songs on the playlist does not trigger this behaviour.


I've also tested the same with the foobar wasapi plugin and this does not occur there. I can't find an exclusive mode setting in foobar, but since other applications (eg a youtube video) are muted during a foobar playback, I guess "exclusive mode" is the default behaviour anyway.

Debug log

Thanks for looking into this!

Best regards

jiri
Posts: 5392
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: [1412] WASAPI Exclusive Mode

Post by jiri » Fri Aug 12, 2011 4:35 pm

Try to modify Advanced settings of the WASAPI plug-in, particularly whether Event drive Exclusive mode is used or not. Since this works for other soundcards correctly, I'd guess that it's just an instance of some buggy drivers.

Jiri

sopito
Posts: 35
Joined: Sun Jun 13, 2010 12:24 pm

Re: [1412] WASAPI Exclusive Mode

Post by sopito » Thu Aug 18, 2011 4:09 pm

Hi

I am using a Benchmark USB DAC1 and I can fully confirm the observation by colazivi including all details. Changing something in advanced settings does not help. I posted a similar problem already some months ago: exclusive mode only worked when the propper audio format was selected. The "automatic format per track" option caused the system to hang. This bug was resolved: the system does not hang but now behaves as described.

sopito

sesam
Posts: 54
Joined: Fri Feb 11, 2011 10:04 pm

Re: [1412] WASAPI Exclusive Mode

Post by sesam » Fri Aug 19, 2011 6:07 pm

Some time back I posted a thread about Wasapi not being gapless in exclusive mode (the problem being a click/static noise during track change)
http://www.mediamonkey.com/forum/viewto ... =6&t=58529

Disabling "event driven exclusive mode" fixed that problem for me.

With "event driven exclusive mode" enabled I can replicate the exact same problem as described here when Pausing and Resuming. Also I'm using a USB DAC, Cambridge Audio DacMagic.

rusty
Posts: 7203
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: [1412] WASAPI Exclusive Mode

Post by rusty » Thu Aug 25, 2011 10:06 pm

Thanks for the feedback.

Tracked at http://www.ventismedia.com/mantis/view.php?id=8294

-Rusty

jiri
Posts: 5392
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: [1412] WASAPI Exclusive Mode [#8294]

Post by jiri » Fri Aug 26, 2011 1:44 am

Sopito, have you also tried what Sesam suggested above, i.e.:
Disabling "event driven exclusive mode" fixed that problem for me.
Jiri

sopito
Posts: 35
Joined: Sun Jun 13, 2010 12:24 pm

Re: [1412] WASAPI Exclusive Mode [#8294]

Post by sopito » Sat Sep 24, 2011 4:56 am

jiri wrote:Sopito, have you also tried what Sesam suggested above, i.e.:
Disabling "event driven exclusive mode" fixed that problem for me.
Jiri
Hi

It re-tested all of the above with MM4 build 1436. Disabling "event driven exclusive mode" in fact now fixes the problem of slow playback after pause / play. However, WASAPI in connection with external USB DAC still seems to be unreliable. E.g. I keep getting error messages like "Access violation at Adress xyz in module 'out_WASAPI.dll'". Most of these errors do not cause a chrash.

sopito

jiri
Posts: 5392
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: [1412] WASAPI Exclusive Mode [#8294]

Post by jiri » Sun Sep 25, 2011 3:00 am

Does WASAPI work reliably with other applications? When exactly do you get AVs? E.g. is it on a track change? A debug log might help...

Jiri

XSNiper
Posts: 2
Joined: Wed Oct 05, 2011 1:47 am

Re: [1412] WASAPI Exclusive Mode [#8294]

Post by XSNiper » Wed Oct 05, 2011 1:51 am

I'm still having audio distortion when using the WASAPI output in exclusive mode (build 1439). I'm using an external USB DAC as well. When I uncheck exclusive mode, it does play, but it's really low volume compared to foobar WASAPI output at the same volume percentage.

jiri
Posts: 5392
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: [1412] WASAPI Exclusive Mode [#8294]

Post by jiri » Wed Oct 05, 2011 1:58 am

As for exclusive mode problems - first of all try to disable event drive mode in the Advanced configuration. If this doesn't help, please let us know us much info as possible (format details, debug log, etc.), since we aren't aware of any issue.

As for volume in the shared mode - it's only affected by Windows Mixer, you should be able to get any volume you want. Also make sure it isn't caused by Volume Leveling (as it often decreases volume slightly).

Jiri

XSNiper
Posts: 2
Joined: Wed Oct 05, 2011 1:47 am

Re: [1412] WASAPI Exclusive Mode [#8294]

Post by XSNiper » Sat Oct 08, 2011 2:03 am

It works fine if I route the audio through my Realtek onboard audio. However, when I switch the output to the M-Audio Transit USB, the sound becomes distorted when set to Exclusive, with event drive modes disabled. I'm not sure how a debug log would be generated here or how to do it. The sound card is set to output a 16-bit, 44.1Khz audio signal, the latency is set to 256. Windows is set for 16-bit/44.1Khz. The settings in MM Exclusive mode are set to detect whatever format the file is in. The files in question are 16-bit/44.1Khz. This should work fine, it does in foobar. Something is wrong. I've also checked the audio levels and made sure all ReplayGain or other amplification was turned off when comparing output levels.

Michaela.R
Posts: 1
Joined: Thu Feb 07, 2013 5:40 pm

Re: [1412] WASAPI Exclusive Mode [#8294]

Post by Michaela.R » Sat Jun 13, 2015 7:04 am

Try to raise the buffers in "Advanced settings" :wink: For me it solved the problem when raising both buffers for "Pull mode (event driven)" from 10 to 50 ms :D

Post Reply