class
FNetAudioEventGate
What the server checks before it lets a client's audio event reach the other peers. A client is untrusted: it can name any cue id, any position and any volume, as often as it likes. The gate only passes a cue the server registered, a finite position near the sender's own pawn, a sane volume, and no more than the sender's rate allows. The pure rules, apart from the network layer, so they can be tested by value.
- Module
- Audio
- Header
#include "Audio/NetAudioEvent.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
uint32_t | CueIdFromName | |
uint32_t | PickVariant | The take a seed names; the same on every peer. |
void | RegisterCue | |
const FCue* | FindCue | |
void | SetMaxClaimDistance | How far from the sender's own position an event may claim to sound. |
void | SetRate | A peer's bucket holds burst events and refills at perSecond. |
ENetAudioEventVerdict | Validate | |
void | Refill | |
void | ForgetPeer | |
bool | IsRelevant | True when a listener at listener is within the cue's radius of the event. |
Function details
CueIdFromName
C++
static uint32_t CueIdFromName(const std::string& name)PickVariant
C++
static uint32_t PickVariant(uint32_t seed, uint32_t count)The take a seed names; the same on every peer.
RegisterCue
C++
void RegisterCue(uint32_t cueId, const std::vector<std::string>& variants, float radius)FindCue
C++
const FCue* FindCue(uint32_t cueId) constSetMaxClaimDistance
C++
void SetMaxClaimDistance(float meters)How far from the sender's own position an event may claim to sound.
SetRate
C++
void SetRate(float perSecond, float burst)A peer's bucket holds burst events and refills at perSecond.
Validate
C++
ENetAudioEventVerdict Validate(uint32_t peerId, const FNetAudioEvent& event, const Vec3& senderPosition, bool haveSenderPosition)Refill
C++
void Refill(float deltaTime)ForgetPeer
C++
void ForgetPeer(uint32_t peerId)IsRelevant
C++
bool IsRelevant(const FNetAudioEvent& event, const Vec3& listener) constTrue when a listener at listener is within the cue's radius of the event.
Generated from Audio/NetAudioEvent.h via audio.json · Dec 5, 2026Version 1.1.0