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

ReturnsNameDescription
FAudioStreamCache&Get
voidSetBudgetBytes0 is no cap.
uint64_tGetBudgetBytes
boolPreloadHow a clip is held from now on; Prime registers it at once.
voidSetBehavior
voidNoteSourceLoadA source is about to play path: counts a hit or a miss, and keeps a Retain clip resident.
voidBeginLevelThe clips a level names: OnLevelLoad ones decode now and are released by EndLevel.
voidEndLevel
boolKnowsTrue once the cache has seen the clip (a load, a preload or a behaviour).
boolIsResident
EAudioLoadBehaviorGetBehavior
const FStats&GetStats
voidClearDrops 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() const

Preload

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) const

True once the cache has seen the clip (a load, a preload or a behaviour).

IsResident

C++
bool IsResident(const std::string& path) const

GetBehavior

C++
EAudioLoadBehavior GetBehavior(const std::string& path) const

GetStats

C++
const FStats& GetStats() const

Clear

C++
void Clear()

Drops everything and forgets the behaviours.

Generated from Audio/AudioStreamCache.h via audio.json · Dec 5, 2026Version 1.1.0