Spaces:
Sleeping
Sleeping
Commit History
-
Add IndexedDB preset caching with background prefetch
Mina Emadi +1: Claude Sonnet 4.6- Backend: stateless GET /api/preset-stem/{name}/{stem} endpoint serves int16 PCM without creating a session (used by prefetcher) - New presetCache.js: IndexedDB wrapper with versioned keys for cache invalidation when preset audio changes - New usePresetCache.js: on app mount, checks IndexedDB for each preset and background-fetches any that are missing - useAudioEngine: added loadStemsFromBytes() to build AudioBuffers directly from cached bytes with no network round-trip - App.jsx: cache-aware handleStemsReady — uses loadStemsFromBytes on cache hit, falls back to loadStems on miss - FileUpload: shows ✓ / … status badge per preset in dropdown First visit: background prefetch populates IndexedDB while user explores the UI. Subsequent visits: preset loads are instant from local cache. Uncommented AI continuation section in ControlPanel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d2f89e9