/
/
# What does this implement/fix? Seeking far ahead in a track can take a moment: the audio has to be produced before it can be played, and a source that hands over its audio at playback pace (Spotify through the Soloist backend) needs that time in real time. Music Assistant allows a seek up to 20 seconds ahead of what the source has produced, but the AirPlay speaker was given only 5 seconds to report audio flowing before the connection was torn down and rebuilt — which then waits for exactly the same audio, and pays a reconnect and a clock probe on top. Measured on a real speaker: a seek to 0:30 with 21s produced needed 9 seconds of audio, gave up after 5, and restarted the speaker for nothing. Changes: - the speaker is only judged silent once it has actually been handed audio, so its own budget measures the speaker instead of the source - that wait ends as soon as the source ends, is cancelled, or never delivers anything **Related issue (if applicable):** - follow-up on #6050 ## Types of changes - [x] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.