Repository navigation
runtime: count decoded Opus completions and desktop audio submissions - #3178
Conversation
…-count # Conflicts: # src/startup_stubs/xapu.cpp
|
Merged |
|
Windows checks #8436 completed successfully on |
R0Y00
left a comment
There was a problem hiding this comment.
I integrated b1dd0bd7 over main 4b0350ea (clean tree 1660eb86), built with libopus 1.5.2, and ran ctest --test-dir <build> --no-tests=error -j1 -V -R '^(startup_xapu_(opus_count|queue|opus)|startup_audio_output)$'. The existing suite passed 4/4 in Debug and Release /O2.
The documented invalid_argument telemetry misses out-of-range slots in two paths. The typed stream path sets hr_invalid_arg before decode_packet without setting refusal, and the legacy path in decode_packet also returns early for slot >= max_slots without setting it. I added two synthetic type-3 commands with slot = UINT32_MAX to the count fixture, using a valid packet and output window. Each returned E_INVALIDARG, queued nothing and left the output untouched. The summary changed from type3=8 invalid_argument=1 refusals=7 to type3=10 invalid_argument=1 refusals=7; I expected type3=10 invalid_argument=3 refusals=9.
Please classify the invalid slot at both returns and add a counter control covering both modes. A local change assigning DecodeRefusal::invalid_argument at the two sites produced the expected summary and passed all four Debug tests. The changes and probe stayed local.
The typed-stream path rejected an out-of-range slot before decode_packet without setting the refusal reason, and the legacy decode path returned without classifying it. Set DecodeRefusal::invalid_argument at both sites. The count fixture now sends slot UINT32_MAX through the legacy and stream paths and expects type3=10, invalid_argument=3, refusals=9.
Review update (2026-11-27,
|
|
@R0Y00 both invalid-slot paths now classify |
|
Release is now verified too: with a Release libopus 1.5.2 static build, |
|
Windows checks #8462 completed successfully on |
R0Y00
left a comment
There was a problem hiding this comment.
The previous invalid-slot finding is addressed on fd2f693e: both the legacy decode guard and typed stream guard now classify slot >= max_slots, and the count fixture exercises both. Independently integrated over main fad97f47 (clean tree 3208b0ee) and built with libopus 1.5.2. ctest --test-dir <build> --no-tests=error -j1 -V -R '^(startup_xapu_(opus_count|queue|opus)|startup_audio_output)$' passed 4/4 in Debug and Release /O2, no skips. Both logs contain type3=10 packets=2 completions=2 refusals=9 invalid_argument=3, and the rest of the refusal fields are intact. The intervening #3222 merge adds only GPU fixture/docs changes and leaves the audio paths and tests identical. Hosted Windows passed.
Changes
Adds bounded, saturating telemetry to the optional Opus decode path:
xapu.dllcounts readable type 3 commands, successful libopus decodes, dequeued type 3 completions, and each refusal reason (invalid_argument,opus_error,capacity,queue_full,short_command,unknown_handle,out_of_memory,header).x2w-audio XApu opus summary:line is written at the last disconnect, or fromatexitwhen the run never disconnects, only when the counters moved.acceptedandnot_opensubmissions, so an endpoint that never opened is distinguishable from one that accepted decoded blocks.Validation
Built with libopus 1.5.2 (static MSVC runtime) on Windows 11 build 26300:
startup_xapu_opus_count: passed (2 decodes/dequeues, 7 refusals by reason, one summary, saturation, typed-completions-off control).startup_xapu_opus,startup_xapu_queue,startup_audio_output: 3/3 passed.Limits
The counters prove that the optional decode path ran and that the caller consumed the results. They do not prove that the output was audible, that the desktop sink accepted the same block, or that XMA/AcpHal works. The title run behind the 27/11 audio observation was not available locally, so this PR adds the measurement, not the run receipt.
Refs #1145 #870.
Merge update (2026-11-27,
b1dd0bd7)Merged
origin/main(e582a9a4) into the branch. The only conflict wassrc/startup_stubs/xapu.cpp: main's typed Opus stream path (48 kHz stream channels, skipped frames, planar stereo, sequence/options/context result words) and this PR's counters/refusal classification now share oneQueueEntryand onedecode_packet. The stream path computesentry.frames/valueand the planar buffer; the counters observe the successful decode and refusal reason.Debug
startup_xapu_opus_count,startup_xapu_queue,startup_xapu_opusandstartup_audio_outputpass 4/4 with libopus 1.5.2 static. A separate Release libopus 1.5.2 static build now links and passes the same four tests.Review update (2026-11-27,
fd2f693e)R0Y00's invalid-slot finding is fixed. Both return sites now set
DecodeRefusal::invalid_argument: the typed stream check inXApuEnqueueCommandand the legacyslot >= max_slotscheck indecode_packet. The channel-count invalid-argument branches in the stream path set it too.startup_xapu_opus_count_checknow sends a valid packet and output window withslot = UINT32_MAXthrough both the legacy connection and a process-1 typed stream connection. Both returnE_INVALIDARG, queue nothing and leave the output untouched. The summary is nowtype3=10 packets=2 completions=2 refusals=9 invalid_argument=3 ..., matching the expected counts.Debug and Release with libopus 1.5.2 static:
startup_xapu_opus_count,startup_xapu_queue,startup_xapu_opusandstartup_audio_outputpass 4/4. CI is running onfd2f693e.