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
| Type | Name | Description |
|---|---|---|
static constexpr const char* | kCrackleParameter | Default "Crackle". |
Public functions
| Returns | Name | Description |
|---|---|---|
FAudioImpulseMemory& | Get | |
void | SetHalfLife | |
float | GetHalfLife | |
void | SetCapacity | |
void | AddImpulse | |
void | Tick | |
void | Reset | |
float | GetCrackle | 1 - exp(-sum of decayed strengths): 0 in silence, toward 1 under a sustained barrage, never past it however many impulses pile up. |
float | GetDecayedSum | |
float | GetEnergyNear | Decayed strength of the impulses within radius of position. |
std::vector<FAudioImpulse> | GetRecent | The impulses still remembered, newest first, with their decayed strength. |
double | GetClock | |
size_t | GetCount |
Function details
Get
C++
static FAudioImpulseMemory& Get()SetHalfLife
C++
void SetHalfLife(float seconds)GetHalfLife
C++
float GetHalfLife() constSetCapacity
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() const1 - 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() constGetEnergyNear
C++
float GetEnergyNear(const Vec3& position, float radius) constDecayed strength of the impulses within radius of position.
GetRecent
C++
std::vector<FAudioImpulse> GetRecent(float maxAgeSeconds) constThe impulses still remembered, newest first, with their decayed strength.
GetClock
C++
double GetClock() constGetCount
C++
size_t GetCount() constGenerated from Audio/AudioImpulseMemory.h via audio.json · Oct 26, 2026Version 1.0.0