Skip to content

fix(playback): reopen track on Repeat One EOF and restore deck volume/mute on transitions - #211

Merged
ajisth69 merged 1 commit into
Clash-Projects:mainfrom
anburaven13:fix/repeat-one-and-silent-playback
Dec 5, 2026
Merged

ajisth69 merged 1 commit into
Clash-Projects:mainfrom
anburaven13:fix/repeat-one-and-silent-playback

Conversation

@anburaven13

Copy link
Copy Markdown
Contributor

Fixes silent playback after Repeat One loops and across track/crossfade transitions.

Root Cause

  1. Repeat One at EOF: MPV_END_FILE_REASON_EOF arrives after libmpv closes the ended stream (keep-open is off), so seek(0) + play_resume() left the deck idle instead of restarting audio. In addition, advance_gapless() ran before checking RepeatMode::One, and cycle_repeat() left previously queued gapless_next entries intact.
  2. Stuck 0% volume / mute / DJ EQ across transitions: open() and advance_gapless() did not reset deck volume (full_deck_volume_from), mute = "no", or @lwdj EQ (0.0, 0.0), and cancel_crossfade() skipped restoring primary volume when standby was None.

Changes (src-tauri/src/audio/playback_service.rs)

  • Prioritize RepeatMode::One ahead of advance_gapless() in on_track_completed() and reopen current_index cleanly via resolve_and_open().
  • Clear gapless_next and playlist-clear when toggling into RepeatMode::One in cycle_repeat().
  • Restore full_deck_volume, mute = "no", and flat @lwdj EQ in open(), advance_gapless(), ensure_player(), and cancel_crossfade().
  • Add unit tests for Repeat One EOF replay and volume restoration after fade-to-zero.

@ajisth69
ajisth69 merged commit ea5570d into Clash-Projects:main Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants