mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
The computer lost about 24 ms on every AVPlayer rate change, so a nudge for 49 ms ended near 48 ms again and the aligner nudged every 4 s for the whole session. The aligner now measures what each nudge's two rate changes cost and plans the next one with it, lets a nudge run its course (replanned once from a settled check, at the same rate), ignores checks for 1 s after a rate change, and leaves errors inside the band alone where the cost is larger than the band. When planned nudges keep missing, it holds: no nudge until the drift passes 80 ms. After a cue the lead now takes the whole settled offset, from two checks that agree, instead of 60 % of the first one. Each check logs the follower's reported and expected position, drift, rate and nudge state at debug level, and each nudge's end logs the drift before, expected and measured at info level.