fix(audio-cue): recover when resume() is rejected or wakes non-running (#757)
Long sessions park the shared AudioContext in 'suspended' / WebKit 'interrupted' after the system audio session is repeatedly preempted by ASR and recording. The earlier fix only recreated a 'closed' context: a rejected resume() was swallowed and a resume() that resolved without reaching 'running' scheduled voices on a frozen currentTime, both of which leave the start cue permanently silent until the app restarts. Treat both "won't wake" states as recoverable — discard the dead context and retry once on a fresh one, bounded to avoid infinite recreation. The decision is extracted into the pure, unit-tested cueActionAfterResume. Co-authored-by: sim <sim@local>
This commit is contained in:
1 parent
7de0c04ba5
commit
95e4cdf203