class

FAudioImpulseMemory

FAudioImpulseMemory — the ambience's short memory of loud things: where the recent impulses (a scan, a door slam, a gunshot) happened and how much of each is still "in the air". Two things read it:

Module
Audio
Header
#include "Audio/AudioImpulseMemory.h"
Namespace
Mowo
  • the crackle accumulator: the decayed sum of every impulse, squashed to 0..1 and published as the "Crackle" parameter each tick, so a bed of crackles thickens after a burst of noise and thins out again; - spatial queries: how much happened near a point recently, and where the latest impulses were, so an ambience can answer from the direction the noise came from rather than from everywhere at once.

Each impulse halves every HalfLife seconds and is forgotten below 1% of its strength or past the capacity (oldest first). Main thread only; ticked by AudioEngine::UpdateVoices.

Properties

TypeNameDescription
static constexpr const char*kCrackleParameterDefault "Crackle".

Public functions

ReturnsNameDescription
FAudioImpulseMemory&Get
voidSetHalfLife
floatGetHalfLife
voidSetCapacity
voidAddImpulse
voidTick
voidReset
floatGetCrackle1 - exp(-sum of decayed strengths): 0 in silence, toward 1 under a sustained barrage, never past it however many impulses pile up.
floatGetDecayedSum
floatGetEnergyNearDecayed strength of the impulses within radius of position.
std::vector<FAudioImpulse>GetRecentThe impulses still remembered, newest first, with their decayed strength.
doubleGetClock
size_tGetCount

Function details

Get

C++
static FAudioImpulseMemory& Get()

SetHalfLife

C++
void SetHalfLife(float seconds)

GetHalfLife

C++
float GetHalfLife() const

SetCapacity

C++
void SetCapacity(uint32_t capacity)

AddImpulse

C++
void AddImpulse(const Vec3& position, float strength)

Tick

C++
void Tick(float deltaTime)

Reset

C++
void Reset()

GetCrackle

C++
float GetCrackle() const

1 - exp(-sum of decayed strengths): 0 in silence, toward 1 under a sustained barrage, never past it however many impulses pile up.

GetDecayedSum

C++
float GetDecayedSum() const

GetEnergyNear

C++
float GetEnergyNear(const Vec3& position, float radius) const

Decayed strength of the impulses within radius of position.

GetRecent

C++
std::vector<FAudioImpulse> GetRecent(float maxAgeSeconds) const

The impulses still remembered, newest first, with their decayed strength.

GetClock

C++
double GetClock() const

GetCount

C++
size_t GetCount() const
Generated from Audio/AudioImpulseMemory.h via audio.json · Oct 26, 2026Version 1.0.0