dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
668 stars 26 forks source link

Playback resets when disconnect output device #386

Open norohind opened 1 month ago

norohind commented 1 month ago

Steps to reproduce:

  1. Start playing something
  2. Disconnect current sound output device (i.e. usb headphones)
  3. Observe in the bottom status bar there is no more info about currently playing song 3.1 Observe you can't continue to play music until you connect the same output device back or manually select a new device in settings.

Expected behavior

When the active output device is disconnected, the player should continue playback on next suitable device or pause playback (i'm fine with any of these)

Additional info

os: Windows 10 Pro Supersonic version: 0.10.1

Also, this problem shows up even when you disconnect current device when playback is manually paused. To be honest, this is my main trouble: when I put the player on pause, disconnect my headphones, then later return to PC, connect headphones back and current progress of a song is reset.

dweymouth commented 1 month ago

What audio device do you have selected in the settings dialog? For me at least, when using "Autoselect device" it will automatically switch to the next available device when you disconnect the active output device. I can look into the other case, where I think the correct behavior would be to pause, but it'd need MPV to emit an event when the device is disconnected for Supersonic to respond to. Not sure such an event exists but I will investigate.

norohind commented 1 month ago

Indeed, I had selected specific device. Now with 'Autoselect device' it behaves fine when connecting and disconnecting device. That what I wanted, thank you!

If you don't want to investigate it further, feel free to close the issue as resolved.