Skip to content

fix: resolve 3 medium-severity review issues#11

Merged
Detair merged 1 commit into
masterfrom
fix/medium-severity-issues
Feb 7, 2026
Merged

fix: resolve 3 medium-severity review issues#11
Detair merged 1 commit into
masterfrom
fix/medium-severity-issues

Conversation

@Detair

@Detair Detair commented Feb 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Live-updatable gate threshold, suppression & dynamic threshold: Added Arc<Atomic*> fields so the audio thread reads these values each frame instead of using values captured at engine start. GUI slider, preset, and calibration changes now take effect immediately without restarting the engine.
  • Cache pactl virtual sink check: virtual_sink_exists() was spawning pactl on every GUI frame (~30fps). Now cached with a 2-second refresh timer.
  • Pre-allocate spectrum Hann window buffers: Pre-compute Hann coefficients once and reuse fixed-size buffers, eliminating two Vec allocations per spectrum analysis call on the audio thread.

Test plan

  • cargo check passes
  • cargo clippy — no new warnings
  • cargo test — all 16 tests pass
  • Verify gate threshold slider changes take effect while engine is running
  • Verify preset switching updates audio processing live
  • Verify calibration result applies to running engine
  • Confirm no increased CPU usage from removed per-frame pactl calls

🤖 Generated with Claude Code

1. Live-updatable gate threshold, suppression & dynamic threshold:
   Added Arc<Atomic*> fields to VoidProcessor for gate_threshold,
   suppression_strength, and dynamic_threshold_enabled. The audio
   thread now reads these atomics each frame instead of using values
   captured at engine start. GUI slider/preset/calibration changes
   take effect immediately without restarting the engine.

2. Cache pactl virtual sink check:
   virtual_sink_exists() was spawning pactl on every GUI frame (~30fps).
   Now cached with a 2-second refresh timer, matching the connected apps
   refresh pattern.

3. Pre-allocate spectrum Hann window buffers:
   Pre-compute Hann window coefficients once at processor creation and
   reuse fixed-size buffers for windowed samples, eliminating two Vec
   allocations per spectrum analysis call on the audio thread.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Detair Detair merged commit 8cb0b6b into master Feb 7, 2026
1 of 3 checks passed
@Detair Detair deleted the fix/medium-severity-issues branch February 7, 2026 18:43
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