Skip to content

fix: prevent decibri play from hanging on device loss or Ctrl+C - #32

Merged
rossarmstrong merged 1 commit into
mainfrom
development
Jul 11, 2026
Merged

fix: prevent decibri play from hanging on device loss or Ctrl+C#32
rossarmstrong merged 1 commit into
mainfrom
development

Conversation

@rossarmstrong

Copy link
Copy Markdown
Member
  • src/commands/play.rs: run the blocking send loop and the EOF drain on a feeder thread holding a SpeakerSink, with the main thread owning the SpeakerStream and orchestrating shutdown; stop() the stream on Ctrl+C and on observed device failure (is_playing() false) so a parked send or drain is released, the device is freed, and playback ends deterministically (exit 0 on interrupt, exit 4 on device loss, exit 0 on normal EOF)
  • README.md: exit-code 4 now covers device loss mid-playback as well as mid-capture
  • CHANGELOG.md: Unreleased entry for the play hang fix

- src/commands/play.rs: run the blocking send loop and the EOF drain on
  a feeder thread holding a SpeakerSink, with the main thread owning
  the SpeakerStream and orchestrating shutdown; stop() the stream on
  Ctrl+C and on observed device failure (is_playing() false) so a
  parked send or drain is released, the device is freed, and playback
  ends deterministically (exit 0 on interrupt, exit 4 on device loss,
  exit 0 on normal EOF)
- README.md: exit-code 4 now covers device loss mid-playback as well
  as mid-capture
- CHANGELOG.md: Unreleased entry for the play hang fix
@rossarmstrong
rossarmstrong merged commit 1387ccf into main Jul 11, 2026
9 checks passed
@rossarmstrong
rossarmstrong deleted the development branch July 11, 2026 04:24
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant