Recover monitoring audio without stopping capture

Compared with 8cde31f:

- Keep transient zero-byte QAudioSink writes retryable while detecting two seconds of continuous no-progress as a playback stall.

- Rebuild only the monitoring QAudioSink after write failure, output-device loss, or sustained backpressure instead of stopping the channel capture.

- Drop stale queued monitoring PCM before recovery and reacquire the current default audio output on bounded retry intervals.

- Preserve video capture, audio acquisition, SDK frame ownership, and stop-time worker wakeups while playback recovers independently.

- Update the README and customer API guidance to document playback isolation and recovery responsibilities.

Validation: git diff --check and focused source inspection passed; no build, audio-device removal, or hardware capture validation was run.
This commit is contained in:
Mark.lin
2026-09-08 14:05:58 +08:00
parent 8cde31feaf
commit 7e5d3d2cca
3 changed files with 130 additions and 78 deletions
+4
View File
@@ -121,6 +121,10 @@ Audio 採用相同的 pull 與 ownership 模型:
- 若播放或錄音需要在 release 後繼續使用 PCM,Application 必須先複製。
- SDK 只保有單一交付 buffer,不建立 audio ring;播放排程與 buffering 屬於
Application/Qt/WASAPI。
- Monitoring playback 不應反向阻塞 capture 或 recording。`QAudioSink` 暫時回傳
zero bytes 時可短暫重試;若持續沒有進度,Application 應丟棄過期播放資料並只
重建 output sink,保留 capture 與 recording。音訊 output device 恢復後從最新
PCM 繼續播放。
`timeout_ms` 的共同規則:`0` 表示不等待;`GVFG_TIMEOUT_INFINITE` 表示無限等待;
其他值的單位為毫秒。