Files
qbz/crates
vicrodh 3a6aae19a3 feat(player): add prefetch and gapless cache helpers
Add three public Player methods that drive gapless playback without
touching the audio thread:

- prefetch_into_cache: download an upcoming track fully into L1/L2
  cache so it later plays via play_data (cache hit) rather than the
  streaming path. CMAF download_full first, legacy full download as
  fallback. No-ops on streaming_only / already-cached / in-flight.
- is_track_cached: cheap L1/L2 membership check for the controller.
- fetch_for_gapless: resolve a track's bytes for a gapless handoff
  via L1 memory then L2 disk then CMAF download_full. Ports the
  L1/L2/CMAF tiers of Tauri's v2_play_next_gapless.

All three reuse existing primitives (audio_cache, download_audio);
the protected audio-thread command handlers are untouched.

cc
2026-05-19 03:01:22 -06:00
..