Author Topic: Release audio device on pause when using WASAPI in Exclusive Mode  (Read 136 times)

pilau

  • Posts: 18
XMPlay is my preferred player - but it's got quite an annoying snag: when pausing a song playing over WASAPI in Exclusive Mode, the audio device is still occupied by XMPlay. That's very hindering to daily workflow.  The only way to release the device on XMPlay is by stopping playback completely, losing your play position. Other WASAPI in Exclusive Mode supporting players are able to do that, including mcool which also uses BASS library.

Thanks for considering.

Ian @ un4seen

  • Administrator
  • Posts: 20063
Here's an update that adds the option of stopping/releasing the output (instead of just pausing it) when the pause button is pressed:

   www.un4seen.com/stuff/xmplay.exe

Add a "PauseStop=1" line to your XMPLAY.INI file to enable the new option. Note that the buffered data will be dropped then (ie. it will skip ahead), so you probably won't want to have a very large buffer set.

pilau

  • Posts: 18
Ian! You. Are. The. Man.

Really. Such a fast response! And it works perfectly. This has been such a hindrance for me since day 1 with XMPlay and I now have 0 reasons to ever consider a different player, really...

Question - I am using the default buffer size (750ms). Why did you warn against using a very large buffer? Is there any benefit to it?

Cheers

saga

  • Posts: 2140
Quote
Question - I am using the default buffer size (750ms). Why did you warn against using a very large buffer? Is there any benefit to it?
It effectively means that up to 750ms of already queued-up audio will "get lost" when pausing playback. Of course it's up to you to decide whether that's an issue for you, it might be specially annoying if you just pause playback for a few seconds or so. However, there is probably no reason to use such a huge buffer size these days - even with a buffer of, say, 200ms you should practically never experience dropouts.