mirror of
https://github.com/devgianlu/librespot-android.git
synced 2026-04-26 05:45:50 +03:00
[GH-ISSUE #15] librespot-android crashes if i stop playback from spotify app by changing device #11
Labels
No labels
bug
enhancement
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot-android#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vhaudiquet on GitHub (Jan 6, 2022).
Original GitHub issue: https://github.com/devgianlu/librespot-android/issues/15
If i start playing a song on librespot-android, and then go to my spotify app to change the source of the song, librespot-android crashes :
This is caused by the line :
if (track != null) track.stop();(AndroidSinkOutput.java:99)I tried to fix the issue, and i have a bizarre behavior ; this code :
does not crash the player. Maybe i was lucky, or maybe getPlayState() actualizes something inside the AudioTrack ?
Anyway, the state here prints '1' in this case, i.e.
AudioTrack.PLAYSTATE_STOPPED; so a correct fix should be :I'm not sure if it is the "good way" though...
@mitschwimmer commented on GitHub (Jan 8, 2022):
Thanks for reporting @vhaudiquet. I will look into this as soon as I find the time.