Replace broken per-segment Opus decode with WebCodecs AudioDecoder streaming pipeline

This commit is contained in:
daniel-c-harvey
2026-06-23 17:42:06 -04:00
parent d0118997b6
commit 7f3fb74126
13 changed files with 1270 additions and 649 deletions
@@ -71,10 +71,11 @@ public class AudioInteropService : IAsyncDisposable
}
/// <summary>
/// Probes whether this browser can decode Ogg Opus via <c>decodeAudioData</c> (Safari &lt; 18.4 cannot).
/// Phase 18 capability gate (OQ2): the player only requests Opus when this returns true, otherwise it
/// stays on the universal lossless path (AC7 — no listener ever gets silence over a codec gap). Probe
/// failures degrade to <c>false</c> (assume incapable) so an interop error can never silence playback.
/// Probes whether this browser can stream-decode Ogg Opus via WebCodecs (<c>AudioDecoder</c> +
/// <c>codec:'opus'</c>; Safari &lt; 16.4 / older Firefox cannot). Phase 18 capability gate (OQ2): the
/// player only requests Opus when this returns true, otherwise it stays on the universal lossless path
/// (AC7 — no listener ever gets silence over a codec gap). Probe failures degrade to <c>false</c>
/// (assume incapable) so an interop error can never silence playback.
/// </summary>
public async Task<bool> CanDecodeOggOpus()
{