Repository navigation
Fade Discord call audio across buffer gaps - #24
Conversation
… the 20 ms tick. An underrun was a step to silence and an over-full speaker ring dropped samples from the front, which clicked on both ends. Device reopen also ran on the call thread. Co-authored-by: Cursor <cursoragent@cursor.com>
itz4blitz
left a comment
There was a problem hiding this comment.
The playback change does what it says. next ramps the last fade frames to silence before an underrun, and trim_front blends the samples about to play into the new head before dropping the front of an over-full ring. The 20 ms tick only installs a Fresh device and sends the old streams to the device thread to drop. A route check that has not moved returns Quiet and does not reopen. Linux is green.
Two notes, neither blocks the audio change: DeviceDesk.queued is never written, so a choice made while an open is in flight waits in the controls mutex until the next tick, which is fine. The README row for #10 still says that pull request conflicts and needs a rebase; it is already on main.
I cannot approve this from the author account. I'll merge it once macOS and Windows pass on 937f0e5.
Summary
Test plan
cargo test -p mediad(already green on this branch)mediadis gone within a couple of seconds.Made with Cursor