Non-RT service for background sample decode and cache prefetch. More...
#include <sample_resource.hpp>
Public Member Functions | |
| SampleResourceService (SampleResourceCacheLimits limits={}, SampleResourceDecodeFunction decode={}) | |
| ~SampleResourceService () | |
| SampleResourceService (const SampleResourceService &)=delete | |
| SampleResourceService & | operator= (const SampleResourceService &)=delete |
| runtime::BackgroundJobHandle | load_async (std::string path, SampleResourceHandle &target, SampleResourceLoadOptions options={}) |
| runtime::BackgroundJobHandle | prefetch_async (std::string path, SampleResourceLoadOptions options={}) |
| std::size_t | drain_completions () |
| bool | publish_cached (const std::string &path, SampleResourceHandle &target, uint64_t memory_budget_bytes=0) |
| bool | publish_cached (const std::string &path, SampleResourceHandle &target, SampleResourceLoadOptions options) |
| SampleResourceCacheStats | cache_stats () const |
| SampleResourceServiceStats | stats () const |
| std::size_t | pending_count () const |
Static Public Member Functions | |
| static std::optional< AudioFileData > | default_decode (const std::string &path, runtime::BackgroundJobContext &) |
Non-RT service for background sample decode and cache prefetch.
Worker jobs decode files and queue completions. Owners must call drain_completions() from a non-RT control thread to publish decoded data into SampleResourceCache and optional SampleResourceHandle instances.
|
inlineexplicit |
|
inline |
|
delete |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |