|
Some checks failed
CI / build-and-test (push) Failing after 29s
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. |
||
|---|---|---|
| .. | ||
| NdiInteropPInvoke.cs | ||
| NdiNative.cs | ||
| NdiNativeLibraryResolver.cs | ||
| NdiPInvokeHandles.cs | ||
| NdiVersion.cs | ||
| Placeholder.cs | ||
| TeamsISO.Engine.NdiInterop.csproj | ||