Keeping crossfade timing and playlist sync reliable in Metrolist
Written by Alessio on 7/30/2026
Problem
Crossfade timing could drift when playback speed changed, causing the next track to start too early. Separately, playlist synchronization could duplicate playlists and consume excessive memory because cleanup happened after the sync loop began.
Changes
I adjusted the crossfade delay calculation for playback speed, passed that speed to the secondary player, and used an ExoPlayer PlayerMessage for precise timing on the main looper. For playlist sync, I moved cleanup ahead of the sync loop so stale entries are handled before new data is applied.
Result
Crossfade transitions now account for playback speed, and playlist synchronization avoids the duplication and memory problem addressed by the change.
Commits: crossfade timing, playlist synchronization