Skip to content

Fix end-of-file crackle on sound effects#111

Merged
jasonvarga merged 1 commit intomasterfrom
audio-crackle
Apr 16, 2026
Merged

Fix end-of-file crackle on sound effects#111
jasonvarga merged 1 commit intomasterfrom
audio-crackle

Conversation

@jasonvarga
Copy link
Copy Markdown
Member

@jasonvarga jasonvarga commented Apr 16, 2026

Summary

The buddy-in and buddy-out collaboration sound effects had an audible click/crackle at the very end. Inspecting the PCM showed that the last ~8 samples in each source MP3 were clipped to near full-scale (e.g. -32768) — a hard discontinuity against the otherwise quiet tail of each sound. The artifact was reproducible in QuickTime as well as the browser, confirming it was baked into the files rather than a playback issue.

Changes

  • Replaced resources/audio/buddy-in.mp3 and buddy-out.mp3 with .wav versions that have the trailing 20 ms trimmed and a 5 ms linear fade-out applied to avoid reintroducing a click.
  • Updated the two imports in resources/js/Workspace.js to point at the new .wav files.

Switching to WAV (rather than re-encoding to MP3) avoids another lossy round-trip for what are very short UI sounds; the combined size delta is negligible.

Test plan

  • Play resources/audio/buddy-in.wav and buddy-out.wav in QuickTime — confirm no crackle at the end.
  • Trigger both sounds in the collaboration UI (user joins / user leaves) — confirm no crackle.

🤖 Generated with Claude Code

The source MP3s had ~8 samples clipped to full-scale at the end,
producing an audible click. Replaced with WAVs where the trailing
20ms is trimmed and a 5ms linear fade-out is applied.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jasonvarga jasonvarga changed the title Fix end-of-file crackle on collaboration sound effects Fix end-of-file crackle on sound effects Apr 16, 2026
@jasonvarga jasonvarga merged commit 13c8b7c into master Apr 16, 2026
@jasonvarga jasonvarga deleted the audio-crackle branch April 16, 2026 20:39
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