21.2 review remediation: pause-spin, OQ7 comment, rename, C2 cross-check
Skip the back-pressure interop poll while paused (UC5). Document complete() draining the stash in full by design. Rename scheduler isProductionPaused to evaluateProductionPause (latch-advancing); window exposure name unchanged.
This commit is contained in:
@@ -191,6 +191,12 @@ export class OpusStreamDecoder implements IStreamingDecoder {
|
||||
// End-of-stream may arrive while still throttled with bytes stashed (e.g. a short track
|
||||
// that finished sending before the scheduler drained). Configure if needed and replay the
|
||||
// stash so the tail is decoded before flush — otherwise the final seconds would be lost.
|
||||
//
|
||||
// OQ7/AC1-Opus precision note: the stash here is drained in full without a water-mark
|
||||
// check. This is intentionally correct: the stream has ended — you cannot back-pressure a
|
||||
// finished stream — and the remainder is tail-only (bounded by whatever the throttled C#
|
||||
// loop left in flight, which is at most one push() worth of bytes). Adding a water-mark
|
||||
// gate to complete() would silently drop the track's tail and is therefore wrong.
|
||||
if (this.pendingBytes.length > 0) {
|
||||
if (await this.ensureConfigured()) {
|
||||
const stashed = this.pendingBytes;
|
||||
|
||||
Reference in New Issue
Block a user