From dd0f3231c613d381316bced9d794d593ef0f78d5 Mon Sep 17 00:00:00 2001 From: Ali Alavi Date: Fri, 25 Sep 2026 20:06:21 +0000 Subject: [PATCH] fix: decibel logarithmic loudness metering and Apple Intelligence sapphire blue dynamic HUD redesign --- src/AudioRecorder.swift | 6 +- src/HUDOverlay.swift | 166 ++++++++++++++++++++-------------------- 2 files changed, 88 insertions(+), 84 deletions(-) diff --git a/src/AudioRecorder.swift b/src/AudioRecorder.swift index c063fb1..9eaf25f 100644 --- a/src/AudioRecorder.swift +++ b/src/AudioRecorder.swift @@ -151,14 +151,16 @@ public final class AudioRecorder: NSObject, AVCaptureAudioDataOutputSampleBuffer // Stream live audio chunk to WebSocket immediately onAudioChunkAvailable?(data) - // Calculate RMS level for HUD + // Calculate decibel loudness for perceptual, high-responsiveness audio meter var sumSquare: Float = 0 for i in 0..