Fix flow mode not switching sample rate between tracks on wrapped players#4685
Draft
MarvinSchenkel wants to merge 3 commits into
Draft
Fix flow mode not switching sample rate between tracks on wrapped players#4685MarvinSchenkel wants to merge 3 commits into
MarvinSchenkel wants to merge 3 commits into
Conversation
In flow mode the PCM format is anchored on the (protocol) player that requests the stream, but the mid-flow restart check re-resolved the player from the queue id. For wrapped players (e.g. Universal Player around a DLNA renderer) that wrapper has no audio config entries and falls back to 44.1kHz/16bit, so every next track snapped to the flow rate and bit-perfect/smart modes never restarted the flow. The stream then stayed pinned at the first track's sample rate until a manual seek forced a fresh flow. Pass the requesting player into get_queue_flow_stream so restart decisions use the same supported sample rates and flow mode config that anchored the flow format.
MarvinSchenkel
force-pushed
the
fix/flow-mode-sample-rate-restart
branch
from
July 9, 2026 10:57
8bbe74c to
e48d3ae
Compare
Contributor
Contributor
Author
|
Waiting for user confirmation in the related issue |
Member
|
I'm pretty sure this one was already fixed last week or the week before where the active protocol would be resolved to get the active setting |
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.
What does this implement/fix?
Flow mode streams were stuck at the first track's sample rate on wrapped players (e.g. players behind a Universal Group): the mid-flow restart check re-resolved the player from the queue id, which returns the wrapper player. That wrapper has no audio/protocol config entries, so the check fell back to 44.1kHz/16bit defaults and the sample-rate switch never triggered.
get_queue_flow_stream()_flow_restart_context()helper resolves the flow mode config and supported sample rates from that player, falling back to the queue's player when not givenRelated issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.