Skip to content

Fix i686 audio and prepare v0.3.5 - #5

Merged
andy5090 merged 1 commit into
mainfrom
agent/fix-i686-audio-v0.3.5
Aug 1, 2026
Merged

Fix i686 audio and prepare v0.3.5#5
andy5090 merged 1 commit into
mainfrom
agent/fix-i686-audio-v0.3.5

Conversation

@andy5090

@andy5090 andy5090 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

What changed

  • backport CPAL's 32-bit-safe ALSA timestamp conversion
  • let ALSA choose a device-compatible output buffer on i686
  • rebuild the audio stream after non-underrun backend failures
  • add an ignored real-device audio callback diagnostic test
  • bump Termleaf to 0.3.5 and update the changelog

Why

CPAL 0.17.3 multiplied a 32-bit ALSA time_t value by one billion before widening it. On i686 this overflowed and panicked the audio callback thread on its first buffer, leaving the editor responsive but permanently silent.

Impact

Typewriter sounds now remain active on 32-bit x86 Linux, including the currently reproduced i686 environment.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --locked --all-features (82 passed, 1 hardware test ignored)
  • cargo test --locked hardware_audio_callback_stays_alive -- --ignored --nocapture
  • cargo build --locked --release --bins
  • cargo check --locked

dist plan could not run locally because cargo-dist 0.32.0 does not publish an i686 binary and a source installation exceeded this 743 MB host's available memory. The tag workflow runs cargo-dist on GitHub's supported x86_64 runner.

@andy5090
andy5090 marked this pull request as ready for review August 1, 2026 20:12
@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@andy5090
andy5090 merged commit 5c27c86 into main Aug 1, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8bf4eba6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Cargo.toml
# CPAL 0.17.3 overflows when converting ALSA timestamps on 32-bit Linux,
# terminating the audio callback thread on its first buffer. The vendored copy
# backports upstream RustAudio/cpal#1137 until Rodio accepts CPAL 0.18.
cpal = { path = "vendor/cpal" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ship the patched CPAL with Cargo installations

When 0.3.5 is installed from crates.io using the README-supported cargo install termleaf --locked, this repository-local patch does not ship: Cargo excludes the nested vendor/cpal package from Termleaf's .crate archive and resolves CPAL from crates.io during packaging. Those i686 installations therefore receive the original CPAL 0.17.3 timestamp overflow and remain silent, so the patched dependency must be distributed in a form available to packaged consumers.

Useful? React with 👍 / 👎.

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.

1 participant