Expand description
Sample loading and management for native builds
This module provides functionality to load sample banks from disk (TOML manifests + WAV files) and manage a registry of loaded samples for use in audio rendering.
Structs§
- Bank
Metadata - Bank metadata for lazy loading
- Sample
Data - Sample data (mono f32 PCM)
- Sample
Registry - Sample registry for managing loaded samples with lazy loading
Functions§
- auto_
load_ banks - Auto-discover and load banks from standard locations
- get_
sample - Get sample from global registry (with lazy loading)
- get_
stats - Get registry statistics (banks, total samples, loaded samples)
- load_
bank_ from_ directory - Load a bank from a directory containing bank.toml and audio files Uses lazy loading: only metadata is loaded initially, samples are loaded on demand
- register_
sample - Register a sample into the global registry with the given URI.
- register_
sample_ from_ path - Convenience: load a WAV file at
pathand register it under an absolute path string URI. Returns the URI used (absolute path) on success.