class

SoundCue

Module
Audio
Header
#include "Audio/SoundCue.h"
Namespace
Mowo

Type aliases

AliasDescription
using FAssetResolverFn = bool (*)(const std::string& path, SoundCue& cue)Resolver the asset layer (Game) installs so a cue-asset path reference can be turned into a configured cue without the Audio module depending on the asset system. Returns true and configures cue on success.
using FCaptionSinkFn = void (*)(const std::string& key, const std::string& text, float seconds, bool speech)Sink the subtitle system installs so a captioned cue announces itself on Play without Audio knowing anything about subtitles. Same seam as the asset resolver above.

Constructors

SignatureNameDescription
SoundCue() = defaultSoundCue
~SoundCue() = default~SoundCue
SoundCue(const SoundCue&) = deleteSoundCue
SoundCue(SoundCue&&) = defaultSoundCue

Public functions

ReturnsNameDescription
SoundCue&operator=
SoundCue&operator=
voidAddClip
voidAddVoiceAppend a layered voice that plays alongside the primary clip pool.
voidClearClips
int32_tGetVoiceCountTotal simultaneous voices: the primary pool (when non-empty) plus every layered voice.
voidSetAssetResolverInstall / invoke the cue-asset resolver (see FAssetResolverFn).
boolResolveAssetToCue
voidSetCaptionSinkOut-of-line: sm_captionSink lives in the Audio DLL and every module compiles MOWO_API as dllexport, so an inline reader would not resolve.
FCaptionSinkFnGetCaptionSink
voidSetCaption
boolHasCaption
const std::string&GetCaptionKey
const std::string&GetCaptionText
floatGetCaptionSeconds
boolIsCaptionSpeech
AudioSource*PlayPlay a randomly selected clip on the cue's own bus.
AudioSource*Play
AudioSource*PlayAtPositionPlay at a 3D position.
AudioSource*PlayAtPosition
voidStopAll
voidTickRelease instances that have finished.
voidSetVolumeRangeRandomization ranges
voidSetPitchRange
voidSetCooldownCooldown to prevent rapid-fire
voidSetAvoidRepeatAvoid repeating the same clip consecutively
voidSetMaxInstancesMax simultaneous instances (0 = unlimited)
voidSetConcurrencyGroupThe FSoundClasses concurrency group every voice this cue starts joins (empty = none) and their priority for StopLowestPriority.
const std::string&GetConcurrencyGroup
voidSetPriority
floatGetPriority
voidSetBus
voidSetLooping
voidSetSpatial
voidSetDistanceRange
int32_tGetClipCount
const Entry&GetClip
floatGetVolumeMin
floatGetVolumeMax
floatGetPitchMin
floatGetPitchMax
floatGetCooldown
boolGetAvoidRepeat
int32_tGetMaxInstances
AudioBusGetBus
boolIsLooping
boolIsSpatial
floatGetMinDistance
floatGetMaxDistance
int32_tGetActiveInstanceCount

Function details

SoundCue

C++
SoundCue() = default

~SoundCue

C++
~SoundCue() = default

SoundCue

C++
SoundCue(const SoundCue&) = delete

SoundCue

C++
SoundCue(SoundCue&&) = default

operator=

C++
SoundCue& operator=(const SoundCue&) = delete

operator=

C++
SoundCue& operator=(SoundCue&&) = default

AddClip

C++
void AddClip(const std::string& clipPath, float weight = 1.0f)

AddVoice

C++
void AddVoice(const LayeredVoice& voice)

Append a layered voice that plays alongside the primary clip pool. The Mixer node authors these; a single-branch cue never adds any and behaves exactly as before.

ClearClips

C++
void ClearClips()

GetVoiceCount

C++
int32_t GetVoiceCount() const

Total simultaneous voices: the primary pool (when non-empty) plus every layered voice.

SetAssetResolver

C++
static void SetAssetResolver(FAssetResolverFn resolver)

Install / invoke the cue-asset resolver (see FAssetResolverFn).

ResolveAssetToCue

C++
static bool ResolveAssetToCue(const std::string& path, SoundCue& cue)

SetCaptionSink

C++
static void SetCaptionSink(FCaptionSinkFn sink)

Out-of-line: sm_captionSink lives in the Audio DLL and every module compiles MOWO_API as dllexport, so an inline reader would not resolve.

GetCaptionSink

C++
static FCaptionSinkFn GetCaptionSink()

SetCaption

C++
void SetCaption(const std::string& key, const std::string& text, float seconds, bool speech)

HasCaption

C++
bool HasCaption() const

GetCaptionKey

C++
const std::string& GetCaptionKey() const

GetCaptionText

C++
const std::string& GetCaptionText() const

GetCaptionSeconds

C++
float GetCaptionSeconds() const

IsCaptionSpeech

C++
bool IsCaptionSpeech() const

Play

C++
AudioSource* Play()

Play a randomly selected clip on the cue's own bus. Returns the AudioSource playing, or nullptr on failure.

Play

C++
AudioSource* Play(AudioBus bus)

PlayAtPosition

C++
AudioSource* PlayAtPosition(float x, float y, float z)

Play at a 3D position. Forces spatialization for this instance even when the cue is authored non-spatial.

PlayAtPosition

C++
AudioSource* PlayAtPosition(float x, float y, float z, AudioBus bus)

StopAll

C++
void StopAll()

Tick

C++
void Tick()

Release instances that have finished. Play() does this on its own; a long-lived cue that is not being retriggered needs the tick so its finished voices do not sit on the mixer.

SetVolumeRange

C++
void SetVolumeRange(float min, float max)

Randomization ranges

SetPitchRange

C++
void SetPitchRange(float min, float max)

SetCooldown

C++
void SetCooldown(float seconds)

Cooldown to prevent rapid-fire

SetAvoidRepeat

C++
void SetAvoidRepeat(bool avoid)

Avoid repeating the same clip consecutively

SetMaxInstances

C++
void SetMaxInstances(int32_t max)

Max simultaneous instances (0 = unlimited)

SetConcurrencyGroup

C++
void SetConcurrencyGroup(const std::string& group)

The FSoundClasses concurrency group every voice this cue starts joins (empty = none) and their priority for StopLowestPriority. Cue voices used to start with neither, so a group shared with AudioSourceComponents never saw them.

GetConcurrencyGroup

C++
const std::string& GetConcurrencyGroup() const

SetPriority

C++
void SetPriority(float priority)

GetPriority

C++
float GetPriority() const

SetBus

C++
void SetBus(AudioBus bus)

SetLooping

C++
void SetLooping(bool loop)

SetSpatial

C++
void SetSpatial(bool spatial)

SetDistanceRange

C++
void SetDistanceRange(float minDistance, float maxDistance)

GetClipCount

C++
int32_t GetClipCount() const

GetClip

C++
const Entry& GetClip(int32_t index) const

GetVolumeMin

C++
float GetVolumeMin() const

GetVolumeMax

C++
float GetVolumeMax() const

GetPitchMin

C++
float GetPitchMin() const

GetPitchMax

C++
float GetPitchMax() const

GetCooldown

C++
float GetCooldown() const

GetAvoidRepeat

C++
bool GetAvoidRepeat() const

GetMaxInstances

C++
int32_t GetMaxInstances() const

GetBus

C++
AudioBus GetBus() const

IsLooping

C++
bool IsLooping() const

IsSpatial

C++
bool IsSpatial() const

GetMinDistance

C++
float GetMinDistance() const

GetMaxDistance

C++
float GetMaxDistance() const

GetActiveInstanceCount

C++
int32_t GetActiveInstanceCount() const
Generated from Audio/SoundCue.h via audio.json · Oct 26, 2026Version 1.0.0