/
/
# What does this implement/fix? `AudioFormat.__eq__` used to ignore the PCM encoding, so integer and float PCM of the same depth compared as one format. #5918 worked around that with a local `pcm_formats_match()` helper. The model now compares on its content type, so the helper is a literal duplicate of `==` and the four gates can go back to plain equality. **Related issue (if applicable):** - music-assistant/models#375 ## 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 - Bump `music-assistant-models` to 1.1.197. - Remove `pcm_formats_match()` and use `==` / `!=` in `AudioBuffer.get_stream`, the UGP `subscribe_raw` shortcut, the AudioSource ffmpeg bypass and `AirPlayStreamSession.can_replace`. - Two passthrough gates that were already on `==`, and were therefore wrong for integer-vs-float PCM, become correct with the bump: the crossfade resample check in `controllers/streams/audio.py` and the announcement render in `controllers/streams/announcements.py`. Neither can be hit with a mismatch today, but they no longer depend on call-site discipline. - Rework `test_pcm_passthrough_gate.py`, which asserted the old behaviour on purpose. Its two behavioural tests are unchanged. This supersedes the automatic models bump PR: that one on its own leaves the above test failing. ## 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. - [x] 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.