Repository navigation
mic: take non-finite suppressor input as silence; note blob versioning - #280
Merged
Merged
Conversation
The engine already zeroes non-finite input before its stages, but the suppressor can be driven directly (the mic-parity sens mode does), and a NaN or infinity would then stay in its smoothers and overlap-add. Zero such samples at the top of Run::process and test that the output stays finite and recovers. Document that a mic blob of another artifact version gives silence, so provisioning recompiles rather than keeping a stale one. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
RyanTheTide
commented
Nov 27, 2026
RyanTheTide
left a comment
Contributor
Author
There was a problem hiding this comment.
Verdict: MERGE at ae4e4b6f67d5
Blockers: none
Checked:
sens.rs: non-finite samples are zeroed in place before either path (bypass or suppression). Without that, one NaN or Inf stays in the smoothers and the overlap-add for good. This matches what the engine already does ahead of its stages (mic/mod.rs:605), so it only changes behaviour for a direct caller of the suppressor. Engine output on real input is unchanged.- The new test fails without the fix. With the zeroing loop removed,
non_finite_input_is_silence_and_the_state_recoverspanics atsens.rs:431(non-finite output). With it, the test passes, and so does the whole sgv2-core suite (282 + 37 + 15 + 9 + 29 + 5 + 1 + 1 + 4 + 2 passed, 0 failed; one test is ignored, as on main). - The README note on blob versioning matches
artifact.rs(v2 refuses v1 blobs; the plugin then gives silence and health 1). - This is the follow-up to the two non-blocking notes in the #277 review.
Evidence
Buildbox, cargo 1.96.0, cargo test -p sgv2-core at ae4e4b6f67d5, plus a negative run with the zeroing loop deleted (1 failed: the new test).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Two non-blocking review notes from #277:
sgv2-core::mic::sens::Run::processnow takes non-finite input samples as silence. The engine already zeroes them before its stages, but the suppressor can be driven directly (themic-paritysensmode does), and a NaN or infinity would then stay in its smoothers and overlap-add. A new test feeds NaN and ±infinity and checks that the output stays finite and recovers to the clean output.packaging/pipewire/README.mdnotes that the plugin refuses another artifact version: a version-1 mic blob gives silence and health 1. Whatever provisions the blob must recompile it when the plugin changes, rather than keep a stale one.Tested:
cargo fmt --check,cargo clippy --workspace --all-targets -D warningsandtools/check-clean.share clean.mic-compileof the Mac's own bundle wrote a full blob, and a fresh 20 s capture processed on the Mac is bit-identical to the x86 render. Restored: next_entry empty, Enforcing, 0 failed units.Risk: two-way · affects only non-finite suppressor input and a README paragraph. A plain revert undoes it.
Not yet: nothing for this change. The other review note (smoother start-up dip) stays a TODO(SPEC) in the stage report.