/
/
# What does this implement/fix? When an announcement plays on an idle AirPlay speaker it runs as its own short stream, and afterwards the speaker's volume is put back to what it was. On older (AirPlay 1 / RAOP) speakers that restore never arrived: the speaker reports the stream as finished the moment the last bit of audio is heard, and Music Assistant does not send volume commands over a finished stream. The speaker was left sitting at the announcement volume until the next time something played on it. Announcements mixed over music already end with a moment of silence for exactly this kind of breathing room; the dedicated announcement stream now does the same, so the restore lands while the stream is still there. **Related issue (if applicable):** - n/a ## Types of changes - [ ] 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` - [x] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Changes - The dedicated announcement stream now ends with the same trailing silence the mixed-over-music announcements already use. - Both paths share one helper for that silence instead of each sizing it themselves. - Added a test covering it. ## 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.