From 83cc62b46e45e4c7d6673b7060921d65f637fbb6 Mon Sep 17 00:00:00 2001 From: Oliver Lazoroski Date: Tue, 7 Apr 2026 15:25:45 +0200 Subject: [PATCH] fix(client): deduplicate mic.capture_report trace emissions Only trace mic.capture_report when the capturesAudio value actually changes, reducing noise from repeated emissions during sustained silence. The internal dispatchEvent continues firing on every callback so consumers are unaffected. --- packages/client/src/devices/MicrophoneManager.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/client/src/devices/MicrophoneManager.ts b/packages/client/src/devices/MicrophoneManager.ts index 266a54bae0..a155be417a 100644 --- a/packages/client/src/devices/MicrophoneManager.ts +++ b/packages/client/src/devices/MicrophoneManager.ts @@ -158,6 +158,7 @@ export class MicrophoneManager extends AudioDeviceManager d.deviceId === deviceId)?.label; + let lastCapturesAudio: boolean | undefined; this.noAudioDetectorCleanup = createNoAudioDetector(mediaStream, { noAudioThresholdMs: this.silenceThresholdMs, emitIntervalMs: this.silenceThresholdMs, @@ -169,7 +170,12 @@ export class MicrophoneManager extends AudioDeviceManager