mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-25 13:51:33 +01:00
Beat detection normalizes onsets against nearby energy, so a fade, a loud fill or a quieter verse no longer dominates the pulse, and refines the tempo in 0.01 BPM steps. The Dart and native analyzers stay in step. An uncertain grid is retried on nearby windows and only accepted when tempo and phase agree at both edges of the transition. A beat-matched start now checks that the incoming deck actually landed on the outgoing beat. When it cannot be verified, the mix falls back to an unstretched crossfade instead of a misaligned stretch. During the overlap, a phase lock makes small, bounded rate corrections from spaced position samples and stops correcting when those samples are unreliable. A measured but uncertain pulse gets a bass handoff without any tempo change, and speed effects skip beat matching.