(buffers)
| 318 | const offsetWithin = _startOffset - chunkIdx * CHUNK_SEC; |
| 319 | |
| 320 | const startWith = (buffers) => { |
| 321 | if (!playing || destroyed) return; |
| 322 | const when = ctx.currentTime + 0.05; |
| 323 | _startCtxTime = when; |
| 324 | const dur = _scheduleChunk(buffers, when, offsetWithin); |
| 325 | _scheduledTo = _startOffset + dur; |
| 326 | _audioStarted = true; |
| 327 | _fetchChunk(chunkIdx + 1); // pre-fetch next chunk |
| 328 | rafId = requestAnimationFrame(_tick); |
| 329 | }; |
| 330 | |
| 331 | // chunk 0 is pre-decoded during ready(), so the sync path is the hot path. |
| 332 | const hit = _cache.get(chunkIdx); |
no test coverage detected