/
/
# What does this implement/fix? Announcements over AirPlay happened in the wrong order. The volume went up while the music was still playing at full level, and a short announcement (just "test") was over before the volume had actually risen, so it was barely audible or seemed not to play at all. A speaker that was muted beforehand could also end up un-muted again afterwards. The announcement clip is now wrapped in a moment of silence on both sides. Because the music stays ducked for the whole clip, the volume can move inside that silence, where it cannot be heard as the music changing level: the music ducks first, the volume goes up, then the announcement is spoken, and the volume is back before the music comes up again. Changes: - Duck the music first, then raise the volume, then play the announcement - and restore in the same order. - Short announcements now play at the announcement volume from the first word. - Set the announcement volume on the control that actually owns the speaker, so a WiiM or Sonos playing over AirPlay no longer gets it turned up before the announcement starts. - Ignore the receiver's own volume reports for a moment after Music Assistant sets a level, so its echo can no longer un-mute a muted speaker or write the announcement volume back. - Only offer native AirPlay announcements while there is music to mix into; without it the standard announcement handling is used. **Related issue (if applicable):** - n/a (reported directly) ## 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.