Expand description
A bounded local copy of workspace audio, so playback of a NAS workspace reads the network once, and the “play all” concatenation preview.
Constants§
- AUDIO_
CACHE_ MAX_ BYTES _AUDIO_CACHE_MAX_BYTES.- COPY_
CHUNK 🔒
Functions§
- audio_
cache_ dir _audio_cache_dir():$XDG_CACHE_HOME(or~/.cache)/xil-gui/audio.- cache_
url - The
/cache/...URL for a file inside the audio cache, orNonewhen the path is elsewhere (a failed copy falls back to the workspace original). - cached_
audio_ path _cached_audio_path(src): copysrcinto the cache (keyed by path, size and mtime) and return the copy. Any I/O failure returnssrcunchanged.- concatenate_
stems _concatenate_stems(slug, tag, filter): every matching stem joined into one cached MP3, keyed by the ordered(path, size, mtime)of its inputs so a repeat click is instant and a re-produced stem rolls the key over.- evict_
audio_ cache _evict_audio_cache(cache_dir, keep): delete oldest files until the cache is underAUDIO_CACHE_MAX_BYTES.- hex 🔒
- mtime_
ns 🔒 - touch 🔒