class
FAudioStreamCache
The engine's one copy of every decoded clip that outlives its sources. The resource manager already shares a decoded clip between the sources playing it; this cache decides which clips stay registered with it after the last source lets go, so a footstep is not decoded again on every step, under a byte budget. Game thread only.
- Module
- Audio
- Header
#include "Audio/AudioStreamCache.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
FAudioStreamCache& | Get | |
void | SetBudgetBytes | 0 is no cap. |
uint64_t | GetBudgetBytes | |
bool | Preload | How a clip is held from now on; Prime registers it at once. |
void | SetBehavior | |
void | NoteSourceLoad | A source is about to play path: counts a hit or a miss, and keeps a Retain clip resident. |
void | BeginLevel | The clips a level names: OnLevelLoad ones decode now and are released by EndLevel. |
void | EndLevel | |
bool | Knows | True once the cache has seen the clip (a load, a preload or a behaviour). |
bool | IsResident | |
EAudioLoadBehavior | GetBehavior | |
const FStats& | GetStats | |
void | Clear | Drops everything and forgets the behaviours. |
Function details
Get
C++
static FAudioStreamCache& Get()SetBudgetBytes
C++
void SetBudgetBytes(uint64_t bytes)0 is no cap. Prime clips count against it but are never evicted.
GetBudgetBytes
C++
uint64_t GetBudgetBytes() constPreload
C++
bool Preload(const std::string& path, EAudioLoadBehavior behavior)How a clip is held from now on; Prime registers it at once.
SetBehavior
C++
void SetBehavior(const std::string& path, EAudioLoadBehavior behavior)NoteSourceLoad
C++
void NoteSourceLoad(const std::string& path)A source is about to play path: counts a hit or a miss, and keeps a Retain clip resident.
BeginLevel
C++
void BeginLevel(const std::vector<std::string>& paths)The clips a level names: OnLevelLoad ones decode now and are released by EndLevel.
EndLevel
C++
void EndLevel()Knows
C++
bool Knows(const std::string& path) constTrue once the cache has seen the clip (a load, a preload or a behaviour).
IsResident
C++
bool IsResident(const std::string& path) constGetBehavior
C++
EAudioLoadBehavior GetBehavior(const std::string& path) constGetStats
C++
const FStats& GetStats() constClear
C++
void Clear()Drops everything and forgets the behaviours.
Generated from Audio/AudioStreamCache.h via audio.json · Dec 5, 2026Version 1.1.0