dragon-iso/src/tests
Zac Gaetano c53c7a7768
Some checks failed
CI / build-and-test (push) Failing after 29s
Wire engine audio peak metering — UI VU bars now animate
The DataGrid's per-row audio level bar (in the Live column) was inert because IsoHealthStats.PeakAudioLevel always returned 0.0. Engine work needed: capture NDI audio frames, compute peak amplitude, publish through the existing stats path.

Engine:

- AudioPeakComputer (new): max-abs computation across NDI's FLTP / FLT / PCM s16 sample formats. Pure managed code, fully unit-tested (14 cases — clamping behaviour, edge cases like short.MinValue overflow, totalSamples-vs-buffer mismatch defenses).

- INdiInterop.CaptureAudioPeak (new, default-implemented): polls one audio frame, returns peak in [0,1] or null on timeout. FakeNdiInterop inherits the no-op default; production NdiInteropPInvoke overrides with real FLTP decode through a sibling RecvCaptureV3Audio import + RecvFreeAudioV3.

- NdiNative: AudioFrameV3 struct + audio-only RecvCaptureV3 binding + FreeAudioV3.

- NdiReceiver: spins up a sibling audio-capture loop alongside the existing video loop on the same lifetime. Audio failures are caught + logged but never re-thrown (a misbehaving audio path must never tear down the live video pipeline). Latest peak published via Volatile<long> (BitConverter int64 bits) so UI reads are torn-free across threads.

- IsoPipeline.GetStats: surfaces NdiReceiver.LatestAudioPeak as IsoHealthStats.PeakAudioLevel.

UI:

- ParticipantViewModel.OnStatsTick already had the decay logic (max-of-new-or-decayed-old, 0.7 multiplier) waiting for real values. No UI changes needed.

Tests: 14 new + 141 existing = 155/155 passing. 0 warnings, 0 errors.
2026-05-10 13:28:26 -04:00
..
TeamsISO.App.Tests test+feat: App.Tests project + audio VU scaffold + MF recorder stub 2026-05-10 09:41:33 -04:00
TeamsISO.Engine.IntegrationTests test(ndi): end-to-end pipeline round-trip with framerate normalization 2026-05-08 00:39:23 -04:00
TeamsISO.Engine.Tests Wire engine audio peak metering — UI VU bars now animate 2026-05-10 13:28:26 -04:00
.gitkeep chore: add empty TeamsISO solution 2026-05-07 15:07:58 +00:00