HUD: audioLevel producer works but consumer is no-op break; 30Hz wire frames wasted #44

Open
opened 2026-05-12 19:08:23 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-05-12 19:08:23 +00:00 (Migrated from github.com)

Summary

BusOutbound.audioLevel is produced live (Track B-7 / P1-1 wired AudioLevelEmitter so listening-state ring pulses on real mic RMS), but the JS handler is a no-op: // Plan 03-03's ring shader uses a synthetic sine; Phase 6 binds this to the real mic RMS. Intentional no-op for P3. No audioLevel-driven uniform in any HUD shader. Swift wastes ~30 Hz IPC + decode + handler call for nothing rendered.

Evidence

  • File: packages/Bus/Sources/Bus/OutboundBatcher.swift:82 (producer)
  • File: packages/Voice/Sources/Voice/Control/AudioLevelEmitter.swift (real RMS)
  • File: App/AppDelegate.swift:1282-1292 (production wiring)
  • File: webview/packages/hud/src/bus/client.ts:135-138 (consumer is break)
  • File: webview/packages/hud/src/hud/*.tsx — no audioLevel references; independently grep-verified

Recommended fix

Two options:

a) Bind audioLevel to a uAudioRMS uniform on RingMesh so listening-state visibly reacts to voice input. Cheaper net-positive — audioLevel was the whole point of the listening-state ring per the prior audit.

b) Stop emitting from AudioLevelEmitter until the consumer lands. Removes the wire-frame cost.

(a) is the right choice if listening-state visualization is wanted; (b) is the right choice if it isn't.

Test

  • After binding: visual UAT — speak into mic during listening-state → ring shader responds
  • Behavioral: emit synthetic audioLevel events; JS handler invokes uniform update

Source

  • Audit: .planning/audit-2026-05-12/bus-hud-audit.md (2026-05-12) — finding S2

Cross-references

  • Related: bus-hud audit S3 (NaN encoding risk becomes S1 the moment this is wired)
## Summary `BusOutbound.audioLevel` is produced live (Track B-7 / P1-1 wired `AudioLevelEmitter` so listening-state ring pulses on real mic RMS), but the JS handler is a no-op: `// Plan 03-03's ring shader uses a synthetic sine; Phase 6 binds this to the real mic RMS. Intentional no-op for P3.` No `audioLevel`-driven uniform in any HUD shader. Swift wastes ~30 Hz IPC + decode + handler call for nothing rendered. ## Evidence - File: `packages/Bus/Sources/Bus/OutboundBatcher.swift:82` (producer) - File: `packages/Voice/Sources/Voice/Control/AudioLevelEmitter.swift` (real RMS) - File: `App/AppDelegate.swift:1282-1292` (production wiring) - File: `webview/packages/hud/src/bus/client.ts:135-138` (consumer is `break`) - File: `webview/packages/hud/src/hud/*.tsx` — no `audioLevel` references; independently grep-verified ## Recommended fix Two options: a) **Bind `audioLevel` to a `uAudioRMS` uniform on `RingMesh`** so listening-state visibly reacts to voice input. Cheaper net-positive — `audioLevel` was the whole point of the listening-state ring per the prior audit. b) **Stop emitting from `AudioLevelEmitter` until the consumer lands.** Removes the wire-frame cost. (a) is the right choice if listening-state visualization is wanted; (b) is the right choice if it isn't. ## Test - After binding: visual UAT — speak into mic during listening-state → ring shader responds - Behavioral: emit synthetic `audioLevel` events; JS handler invokes uniform update ## Source - Audit: `.planning/audit-2026-05-12/bus-hud-audit.md` (2026-05-12) — finding S2 ## Cross-references - Related: bus-hud audit S3 (NaN encoding risk becomes S1 the moment this is wired)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#44