class

FNetAudioEventRelay

Carries replicated audio events over the RPC channel. On the server it takes a client's ServerRequestAudioEvent after the replication layer has accepted it (the client-callable flag, the owner check and the packet rate limit), runs it through the audio event gate, and sends what passes to every other peer within earshot. On a client it plays what the server sent, picking the variant from the event's seed so all peers hear the same take.

Module
Game
Header
#include "Game/NetAudioEventRelay.h"
Namespace
Mowo

Type aliases

AliasDescription
using FSendFn = std::function<void(uint32_t peerId, uint16_t methodIndex, const std::vector<uint8_t>& args)>
using FPositionFn = std::function<bool(uint32_t peerId, Vec3& out)>
using FPlayFn = std::function<void(const FNetAudioEvent& event, const std::string& clip)>

Constructors

SignatureNameDescription
~FNetAudioEventRelay()~FNetAudioEventRelay

Public functions

ReturnsNameDescription
boolInstall
voidRemove
voidSetPositionProviderWhere a peer's pawn is, for the claim-distance check (sender) and for relevancy (listener).
voidSetSenderReplaces the default send through the replication manager.
voidSetPlayerReplaces the default one-shot through the audio engine.
boolRequestClient: ask the server to play an event at its position, on nid.
voidPlayPayloadThe client half: decodes a MulticastPlayAudioEvent payload and plays the variant its seed names.
const FStats&GetStats

Function details

~FNetAudioEventRelay

C++
~FNetAudioEventRelay()

Install

C++
bool Install(ReplicationManager& rm, FNetAudioEventGate& gate)

Remove

C++
void Remove()

SetPositionProvider

C++
void SetPositionProvider(FPositionFn provider)

Where a peer's pawn is, for the claim-distance check (sender) and for relevancy (listener). A peer with no position is not sent events.

SetSender

C++
void SetSender(FSendFn send)

Replaces the default send through the replication manager.

SetPlayer

C++
void SetPlayer(FPlayFn play)

Replaces the default one-shot through the audio engine.

Request

C++
bool Request(NetworkId nid, const FNetAudioEvent& event)

Client: ask the server to play an event at its position, on nid.

PlayPayload

C++
void PlayPayload(const uint8_t* args, size_t argLen)

The client half: decodes a MulticastPlayAudioEvent payload and plays the variant its seed names. Also what an arriving RPC runs.

GetStats

C++
const FStats& GetStats() const
Generated from Game/NetAudioEventRelay.h via game.json · Dec 5, 2026Version 1.1.0