Skip to content

Skip late tick sounds after the round-change alert - #516

Merged
Splode merged 1 commit into
Splode:mainfrom
tiendo1011:fix/tick-burst-after-alert
Oct 9, 2026
Merged

Splode merged 1 commit into
Splode:mainfrom
tiendo1011:fix/tick-burst-after-alert

Conversation

@tiendo1011

Copy link
Copy Markdown
Contributor

What I observe

With tick sounds on, when a work round ends and the break starts, the first few ticks of the break play rushed together. After that, the ticks go back to one per second.

What I think causes it

I don't have experience with Rust or Tauri, so please correct me if I've misread this.

The audio thread in src-tauri/src/audio/mod.rs plays one sound at a time and waits for each one to finish (sleep_until_end). The round-change alert is about 3 seconds long. The ticks requested during those 3 seconds wait in the channel, then play back-to-back once the alert ends.

The change

Each play request now records when it was made. The audio thread skips a tick if it is more than 500 ms late. Alerts are never skipped.

As a side effect, no ticks play while the alert is playing. After the alert, ticks resume on schedule.

A fuller fix would mix sounds so ticks play over the alert. I kept this one small on purpose.

Testing

  • cargo test passes.
  • I ran the app and checked a work → break transition: ticks no longer bunch up after the alert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Splode
Splode merged commit dda06e6 into Splode:main Oct 9, 2026
5 checks passed
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