Player: auto mode fails over between Spotify and HLS

No Spotify session (or paused, with failover_on_pause) for failover_delay_s
switches to HLS; Spotify playing switches back within ~1 s. Switches fade
out/in over 30 ms and flush the ring. HLS is suspended while Spotify plays.
cspot is held back instead of drained while it isn't Spotify's turn: it keeps
decoding on pause, so dropping its frames let it race through the queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 22:36:11 +10:00
parent 78c480a7c2
commit c6ecbbeb25
6 changed files with 202 additions and 34 deletions
+5
View File
@@ -129,6 +129,11 @@ extern "C" void spotify_pause(bool pause)
}
}
extern "C" bool spotify_session_active(void)
{
return s_handler != nullptr;
}
const char *spotify_state(void)
{
return s_state.load();