Conversation
A fixed 5 s skip blend with less than 5 s of outgoing audio left ends in the file draining mid-fade at ~30% gain — an audible hard cut on short tracks and hot endings (reported skipping the first track of a playlist at ~26 s). Clamp the fade to the remaining audible time and fall back to a hard cut when under a second remains.
sanylax2
changed the base branch from
claude/repo-review-improvements-yvk3t7-smooth-skips
to
main
July 19, 2026 04:09
sanylax0
approved these changes
Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Stacked on #100 (merge that first; if #100 already merged, retarget this to main). Fixes the audible hard cut reported when skipping the first track of a playlist at ~26 s.
Why
The fixed 5 s skip blend never checked how much outgoing audio remains. On a short track (or hot ending), a skip near the end starts a 5 s fade with, say, 4 s of audio left — the outgoing file drains mid-fade while its equal-power gain is still ~30%, so the sound stops instantly instead of fading. That reads as a hard cut in the middle of an otherwise smooth blend.
How
next()clamps the blend duration toeffectiveEndSeconds - position(the audible time actually left, respecting silence trimming), and falls back to the plain hard cut when under 1 second remains — too little to read as a blend.Testing
On device with that playlist: skip the first track at ~26 s again — the mix-out should now complete within the remaining audio, no drop. Skips mid-track (plenty of remaining audio) still get the full 5 s fade.
🤖 Generated with Claude Code
https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP
Generated by Claude Code