Add ASIO signal inspector

This commit is contained in:
Meta Vens 2026-05-25 07:52:14 +01:00
commit a07bb2c8cf
3 changed files with 153 additions and 5 deletions

View file

@ -111,3 +111,4 @@
{"ts": "2026-05-25T06:59:00+01:00", "type": "correction", "status": "invalidated", "note": "Invalidated the apparent cardioid timing proof in `calibration/bioacoustic/complex-contour-live-20260525-063229.md`. The log-mel spectrogram and channel statistics show `asio-ch0` is not a real acoustic signal in that capture: RMS is almost flat (`0.00208350` to `0.00209815` by 0.1s block), peak is only `0.00334287`, and zero-lag correlation with loopback is `0.000032`. The near-seed +1.547 us contour estimate was a seeded tracker fit against noise, not physical mic evidence. The receipt remains valid as a loopback/interface proof (`asio-ch2` -> `asio-ch3` at -0.014 us, confidence 0.971) plus a weak/non-authoritative input witness."}
{"ts": "2026-05-25T07:05:34+01:00", "type": "implementation", "status": "ok", "note": "Added runtime FFT spectra and Fensalir readiness gating. Fensalir now calls IAquariumRuntime.OnSceneReady after the first presented ready frame; Mimir waits for that callback before emitting bioacoustic test audio, running sync analysis, or updating the cached spectrum diagnostics. MimirAudioSpectrumAnalyzer computes bounded Hann-windowed radix-2 FFT snapshots from rolling audio buffers, exposes top peaks/log bands/RMS/peak, and Mimir renders cached spectra in the DirectWrite UI plus telemetry. Verification run with ASIO config showed scene-ready before bioacoustic chunks and live 8192-point spectra for asio-ch0 through asio-ch3; asio-ch0 remains flat low-level noise while loopback/mic-bearing channels show song-band peaks."}
{"ts": "2026-05-25T07:11:48+01:00", "type": "correction", "status": "ok", "note": "Tightened the Fensalir scene-ready gate after runtime spectra testing showed the app still created sources and emitted telemetry before the render path was ready. Runtime config now stores lazy stream-source factories; Mimir.App creates/registers ASIO/process/native sources only inside OnSceneReady, MimirRuntime.Update returns without polling, spectra, sync, telemetry, or audio emission until that callback, and Fensalir constructs the WASAPI/AquaSynth host only after the first presented ready frame. Verification log artifacts/runtime/mimir-ready-gate-20260525-071121.out.log shows no ASIO buffer polling, spectrum telemetry, or bioacoustic batch before D3D12 shader pipelines ready and Mimir Fensalir scene ready."}
{"ts": "2026-05-25T07:51:20+01:00", "type": "verification", "status": "ok", "note": "Audacity WASAPI speech spectrogram corresponds to live physical mic input, not the previously invalidated ASIO noise lane. Focusrite ASIO channel enumeration reports input[0]=Input 1, input[1]=Input 2, input[2]=Loopback 1, input[3]=Loopback 2. A fresh 5s raw ASIO capture artifacts/asio/scarlett-channel-id-20260525-075058-f32.raw inspected with --inspect-asio-f32 shows ch1/Input 2 carrying real speech-band energy (rms 0.009809, peak 0.069316, speechRms 0.007206), ch0/Input 1 at low floor (rms 0.002092), and loopbacks ch2/ch3 silent with no playback. Treat Audacity channel 2 as one-based physical Input 2 => Mimir asio-ch1; do not interpret it as loopback asio-ch2."}