Fix AirPlay Receiver losing audio after quick reconnects#4785
Draft
MarvinSchenkel wants to merge 2 commits into
Draft
Fix AirPlay Receiver losing audio after quick reconnects#4785MarvinSchenkel wants to merge 2 commits into
MarvinSchenkel wants to merge 2 commits into
Conversation
…yback A quick stop->play bounce from the AirPlay sender (e.g. session reconnect) raced the fire-and-forget cmd_stop from the previous session: _clear_active_player already released the claim, so the new play_media was issued immediately and the late stop then killed the freshly started stream, leaving the player 'playing' without audio (#5771). Keep a handle on the pending stop task and let playback start await it before calling play_media, so stop and play are always ordered.
Contributor
Author
|
Awaiting user confirmation in the linked issue |
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?
AirPlay Receiver could report that playback started while producing no audio after a quick session reconnect. Session teardown stopped the target player in a background task, so the delayed stop could complete after the next session had already started playback and kill the new stream.
This was reproduced with an asynchronous simulation. Live hardware verification requires reporter testing because the bundled
shairport-synccannot run in the available macOS test environment.Related 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.