Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release audio-exclusive status when paused #216

Closed
GioF71 opened this issue Jul 5, 2023 · 5 comments
Closed

Release audio-exclusive status when paused #216

GioF71 opened this issue Jul 5, 2023 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@GioF71
Copy link

GioF71 commented Jul 5, 2023

Hello Drew, a feature request here.
Would it be possible to add a "Stop" button to the currently available "Pause"?
This might be helpful when using the Exclusive Mode (which supposedly provides the best possible quality).
Considering my scenario: on Windows 10, I have Supersonic opened playing to a USB DAC in exclusive mode. I also have Qobuz app open, using the same DAC in exclusive mode.
Of course I don't try to play from both apps at the same time, but pausing Supersonic does not seem to be enough for closing the wasapi session and allowing Qobuz to play.
Infact, when I pause SuperSonic and try to play a track from Qobuz, the latter complains about the fact that the device is already in use.
When Supersonic finishes playing its own queue, the playback status goes automatically to "Stopped" (as displayed in the Now Playing view). In this situation, playback from Qobuz becomes possible again.

Let me know what you think.
Thank you in advance.

@GioF71
Copy link
Author

GioF71 commented Jul 5, 2023

As an alternative, if you don't want to clutter the gui with another button, the Pause button might also close the wasapi session.
This is for example what the Qobuz app does. If I pause the playback on that app, I can immediately play on Supersonic.

@dweymouth
Copy link
Owner

I think the latter behavior is what I'll try to go for. I feel like stop buttons have become kind of obsolete in music player UIs, plus I like the symmetry of play in the center. I think I might end up having pause internally stop the MPV player, but remember the playback position so that unpause begins playing from the same place.

In the meantime before I can change this behavior, what I've done a few times is pause, then open settings and disable Audio Exclusive mode - this does release the audio device to be available for other apps.

@GioF71
Copy link
Author

GioF71 commented Jul 6, 2023

Hello, thank you for the quick response.
The second solution is ok, I also believe that the "stop" button is a bit old-fashioned nowadays.
I took a look at the code (but I am not a Go expert), and it seemed to me as well that one solution could be to stop mpv while retaining the playback position.
Also, thank you for the workaround!
I will be waiting for a new release.

Again, congratulations for the great software :-)

@dweymouth dweymouth changed the title [Feature] Stop button Release audio-exclusive status when paused Jul 14, 2023
@dweymouth dweymouth added this to the 0.5.0 milestone Jul 14, 2023
@dweymouth dweymouth added the enhancement New feature or request label Jul 14, 2023
@dweymouth
Copy link
Owner

Turned out to be easier - I just have to ensure Audio Exclusive is internally set to false whenever the player is paused, and re-set it to the desired state on play. It will be in the next release!

@GioF71
Copy link
Author

GioF71 commented Jul 15, 2023

Amazing! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants