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:
@@ -144,7 +144,7 @@ export class AudioPlayer {
|
||||
this.opusDecoder = new OpusStreamDecoder(
|
||||
this.contextManager,
|
||||
this.pendingOpusSidecar,
|
||||
() => this.scheduler.isProductionPaused());
|
||||
() => this.scheduler.evaluateProductionPause());
|
||||
return { success: true };
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ export class AudioPlayer {
|
||||
headerParsed,
|
||||
bufferCount: this.scheduler.getBufferCount(),
|
||||
duration: this.duration,
|
||||
productionPaused: this.scheduler.isProductionPaused()
|
||||
productionPaused: this.scheduler.evaluateProductionPause()
|
||||
};
|
||||
} catch (error) {
|
||||
return { success: false, error: (error as Error).message };
|
||||
@@ -320,7 +320,7 @@ export class AudioPlayer {
|
||||
headerParsed: this.streamDecoder.headerParsed,
|
||||
bufferCount: this.scheduler.getBufferCount(),
|
||||
duration: this.duration,
|
||||
productionPaused: this.scheduler.isProductionPaused()
|
||||
productionPaused: this.scheduler.evaluateProductionPause()
|
||||
};
|
||||
} catch (error) {
|
||||
return { success: false, error: (error as Error).message };
|
||||
@@ -529,7 +529,7 @@ export class AudioPlayer {
|
||||
* interop hop until back-pressure actually engages.
|
||||
*/
|
||||
isProductionPaused(): boolean {
|
||||
return this.scheduler.isProductionPaused();
|
||||
return this.scheduler.evaluateProductionPause();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user