/
/
# What does this implement/fix? When one track crossfades into the next, the flow stream used to fetch the incoming track's audio only after the outgoing track had finished - and it sent nothing to the player while it did. That pause ate into the player's buffer and, on a smart fade (which needs a 45 second window), could be heard as a gap. The incoming audio is now collected in the background while the outgoing track is still playing, so the fade starts the moment the tracks meet. The audio-processing panel also claimed a crossfade in cases where none happens (consecutive tracks from the same album, last track of the queue, next track not ready yet, mismatched sample rates). It now reports the fade that was really applied. - Collect the incoming track's fade-in in the background during the outgoing track's holdback, and continue from that same stream at the transition, so the track is only decoded once - Report the crossfade after the transition has been decided instead of when the stream starts, on both tracks a fade touches - Only credit a track with a crossfade once the blend has really been rendered, and report the fade the mixer actually built (it quietly degrades a smart fade to a standard one when the analysis it needs is missing) - Drop the extra flow-stream buffering for AirPlay, which already has ~10 seconds of its own buffering downstream; Snapcast keeps it, now applied in the provider itself (which also covers its radio streams, where it is a no-op since those are delivered at 1x) ## Types of changes - [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [x] 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.