Author Topic: When starting an exclusive WASAPI stream from another app MusicBee breaks  (Read 1435 times)

filoppi

  • Jr. Member
  • **
  • Posts: 20
MusicBee is unable to recover playback (at least with my current settings, WASAPI Shared) after another application has created an Exclusive WASAPI stream, so it needs to be restarted. This is a minor bug but it's fairly annoying as every time I use that other application, I need to restart MusicBee, while it could just re-try to re-open the session if it notice it had been closed.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34997

filoppi

  • Jr. Member
  • **
  • Posts: 20
I've just tried the first 3.4 version, it doesn't seem to fix it, a restart is still required.
"Unable to start playback (error=BASS_ERROR_START)".
The case I'm talking about is when MusicBee is already playing music and a new (higher priority) WASAPI exclusive session is open, so the MusicBee session will be forcefully closed.
The error doesn't happen if you open MusicBee without playing music, then start another external WASAPI session, close it, and then play music from MusicBee.

My specific test case is the Dolphin emulator, which has a WASAPI exclusive backend. But other applications have it, like Media Player Classic or Reaper.

I think this is what is needed: https://docs.microsoft.com/en-us/windows/win32/api/audiopolicy/nf-audiopolicy-iaudiosessionevents-onsessiondisconnected

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34997
I can reproduce this scenario and I have put in handling for the next update so that playback can be restarted without restarting MB. However MB doesn't detect when the scenario as it happens so doesn't reset the player button state, play position in the progress bar etc. Once I have that figured out i will post another update on this topic

edit:
https://getmusicbee.com/patches/MusicBee34_Patched.zip
unzip and replace the existing musicbee application files
Last Edit: July 09, 2020, 12:09:45 PM by Steven

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
Playback continues on 3.4.7495 P, but I'm unable to interact with MusicBee until it is killed via Task Manager.

Is this occurring for anyone else?