USoundMix
#include "Sound/SoundMix.h" Description
Applies temporary volume, pitch, and EQ adjustments to specified SoundClasses when pushed to the audio device. Commonly used to duck music during dialogue or apply in-game audio effects.
Caveats & Gotchas
- • A SoundMix does nothing on its own — it must be pushed via UGameplayStatics::PushSoundMixModifier to take effect.
- • Multiple SoundMixes can be active simultaneously; their adjustments stack additively per SoundClass. Pop with UGameplayStatics::PopSoundMixModifier when done.
- • Duration < 0 means the mix stays active until explicitly popped. FadeInTime and FadeOutTime control how quickly it blends in and out.
- • Passive SoundMixes (set on USoundClass::PassiveSoundMixModifiers) are pushed automatically when a sound of that class plays and popped when no such sounds are active.
Example
Push and pop a dialogue ducking mix C++
// When dialogue starts:
UGameplayStatics::PushSoundMixModifier(this, DialogueDuckMix);
// When dialogue ends:
UGameplayStatics::PopSoundMixModifier(this, DialogueDuckMix); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?