spotupnp: identify the started track when notifying cspot - #67
Open
007hacky007 wants to merge 1 commit into
Open
spotupnp: identify the started track when notifying cspot#67007hacky007 wants to merge 1 commit into
007hacky007 wants to merge 1 commit into
Conversation
When the renderer reports that a new URL started playing, pass the started streamer's trackUnique to notifyAudioReachedPlayback() so cspot can reject stale notifications. Without this, a start notification from a streamer created before the queue was rebuilt (it races the reload that follows a spirc Load frame, e.g. a track change from a second Connect controller) advances the queue one entry early and playback never resyncs: every subsequent track is restarted at its data-feed EOF and the audio still buffered in the renderer (tens of seconds) is cut off, until the process is restarted. Companion of the cspot-side fix; requires a cspot submodule bump that includes it. The new cspot API keeps a default empty identifier, so the flow-mode call site and other integrations are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion of philippe44/cspot#2, see there for the full analysis.
Short version: a "started by URL" notification from a streamer created before cspot's queue was rebuilt (it races the reload that follows a
Loadframe, e.g. a track change from a second Connect controller) advances the queue one entry early and it never resyncs: every song afterwards is restarted at its data-feed EOF, cutting off the 60-90 s still buffered in the renderer, until spotupnp is restarted.Passes the started streamer's
trackUniquetonotifyAudioReachedPlayback()so cspot can reject stale and duplicate notifications; the flow-mode call site keeps the legacy empty-identifier behavior. Needs the cspot PR merged and the submodule bumped past it first - this does not build against the currently recorded cspot revision.Verified against a Hama DIT2010: the desync reproduced reliably with rapid track changes from a second controller on 0.20.3; with both PRs the stale notifications are ignored and every track plays to its real end.