WASAPI blocks sleep

To get bugs in the current release fixed, please report them here.

Moderator: Gurus

Barleyman
Posts: 3
Joined: Mon May 21, 2012 4:44 pm

WASAPI blocks sleep

Post by Barleyman »

At least on my rig it does.

Setup: Win7 x64, Xonar D1, Monkey 4.03.1476

While WASAPI is playing, computer won't go to sleep/suspend. This is reasonable behavior. However, when you PAUSE a song, computer still won't go to sleep. If you stop the playback, then sleep is available. Problem doesn't appear with DirectX output. At least not in the easily repeatable fashion it does with WASAPI.

It's easy to run into this (at least for me) as the keyboard does not have "stop" button, just play/pause button. Then you get an inflated electric bill..

Technically speaking:

Code: Select all

C:\Windows\system32>powercfg -requests
DISPLAY:
None.

SYSTEM:
[DRIVER] ASUS Xonar D1 Audio Device (PCI\VEN_13F6&DEV_8788&SUBSYS_834F1043&REV_00\5&d93df5b&0&0800E6)
An audio stream is currently in use.

AWAYMODE:
None.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: WASAPI blocks sleep

Post by nohitter151 »

I don't think this is a bug, especially as it works when you've stopped playback.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
Barleyman
Posts: 3
Joined: Mon May 21, 2012 4:44 pm

Re: WASAPI blocks sleep

Post by Barleyman »

Bug or unexpected undesirable behavior, take your pick..
jiri
Posts: 5401
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: WASAPI blocks sleep

Post by jiri »

I don't think that this could be fixed. We certainly could try to close the audio device during pause, but I suspect that it would cause more bad than good, since users have various devices that might depend on the current behavior.

Jiri
Barleyman
Posts: 3
Joined: Mon May 21, 2012 4:44 pm

Re: WASAPI blocks sleep

Post by Barleyman »

jiri wrote:I don't think that this could be fixed. We certainly could try to close the audio device during pause, but I suspect that it would cause more bad than good, since users have various devices that might depend on the current behavior.

Jiri
Is it putting out silent audio bitstream when paused?

Anyways, as I pointed out, DirectX closes the audio stream when paused so therefore there's no problem with suspend.
Post Reply