Skip to content

fix(crossfade): line a skip's tail up with the session so the old song never repeats - #2173

Merged
A-EDev merged 1 commit into
mainfrom
fix/crossfade-skip-repeat
Nov 16, 2026
Merged

A-EDev merged 1 commit into
mainfrom
fix/crossfade-skip-repeat

Conversation

@A-EDev

@A-EDev A-EDev commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • A skip with crossfade builds a muted tail for the old song a little past where it is. When the tail took longer to be heard than that lead, it started behind the session and the hand-off replayed part of the old song.
  • The skip now measures the gap before the hand-off: the session's position is followed from the press, and the tail's comes from where it started and when its audio began. A gap over 50 ms seeks the muted tail (exact seek, up to twice) before it takes over.
  • The lead for the next skip is learned from the measured gap: a short one grows by all of it, a long one shrinks by half, up to 1.5 s.
  • Covers Next and Previous from the app, the notification and the lock screen, and a song picked from a list.

Related issue

Closes #2170

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

Validation

  • ./gradlew :app:assembleGithubDebug
  • ./gradlew :app:testGithubDebugUnitTest (6340 tests, 0 failed)
  • I ran any additional flavor-specific build or test tasks affected by this change. (./gradlew ktlintCheck, ./gradlew :app:compileFossDebugKotlin)
  • I manually tested the affected behavior on an Android device or emulator.

Session Next and music links opened while playing, crossfade 5 s: the tail took over -28, -15, 1, -27 and 11 ms from the session (before: -114 to +654 ms).

Test device and Android version: Xiaomi 2311DRK48G, HyperOS (Android 16)

Screenshots or recordings

Risk and compatibility

Playback: a skip can hold the old song up to about 0.5 s longer while the muted tail seeks. Nothing changes for auto-advance crossfades.

  • The change does not introduce secrets, private data, or unexpected telemetry.
  • New user-facing text uses Android string resources.
  • Dependency and lockfile changes are intentional and limited to this PR.
  • Room schema changes include the required version bump and migration, or this PR does not change the Room schema.
  • Breaking changes and upgrade steps are clearly documented.

@github-actions github-actions Bot added documentation Improvements or additions to documentation player Video and audio playback labels Nov 16, 2026
@A-EDev
A-EDev merged commit 5109335 into main Nov 16, 2026
9 checks passed
@A-EDev
A-EDev deleted the fix/crossfade-skip-repeat branch November 16, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation player Video and audio playback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: corssfade twice audio

1 participant