Skip to content

Comments

AGC improvements for LocalMicrophoneDriver#539

Merged
dooly123 merged 3 commits intoBasisVR:developerfrom
s-ilent:mic-agc-improvements
Feb 19, 2026
Merged

AGC improvements for LocalMicrophoneDriver#539
dooly123 merged 3 commits intoBasisVR:developerfrom
s-ilent:mic-agc-improvements

Conversation

@s-ilent
Copy link
Contributor

@s-ilent s-ilent commented Feb 19, 2026

Changes:

  • Add a noise floor to AGC. When the mic is inactive, the AGC update is skipped, preventing it from automatically increasing the gain correction when the user stop talking.
  • Added a hold timer to AGC. Reduces gain immediately when audio peaks (attack). If the volume is low, it waits for a 0.4s cooldown (hold) before gradually increasing the gain again (release).
  • Only process a small portion of the incoming sound buffer, rather than the entire buffer. With a buffer the size of the sample rate, AGC would take 1 second to update. By performing AGC on a smaller chunk, the changes can take effect much faster.
  • This change also updates denoising to use the smaller buffer.
  • RollingRMS was corrected to not average the values directly (which is incorrect as RMS is a non-linear scale) and instead average the power/mean square before taking the sqrt.

When sound is silence/bg noise, it shouldn't update the AGC.
When sound is loud, AGC will hold its current level for a short period before trying to update
With a buffer the size of the sample rate, AGC will take 1 second to take effect.
By performing AGC on a smaller chunk, the changes can take effect much faster.
This change also changes denoising to use the smaller buffer.
RollingRMS was also corrected to not average the values directly
(which is incorrect as RMS is a non-linear scale)
and instead average the power/mean square before taking the sqrt.
@dooly123 dooly123 merged commit d986177 into BasisVR:developer Feb 19, 2026
3 of 8 checks passed
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.

2 participants