RealDocs

UGameplayStatics::ClearSoundMixClassOverride

function Engine Blueprint Since 4.11
#include "Kismet/GameplayStatics.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallable

Description

Removes a per-class volume/pitch override that was previously applied to a Sound Mix via SetSoundMixClassOverride, fading back to the unoverridden values. Use this to undo targeted dynamic audio adjustments without discarding the rest of the mix.

Caveats & Gotchas

  • • The mix must still be active (pushed onto the audio system) for the fade-out to be audible; clearing an override on an inactive mix has no effect.
  • • If FadeOutTime is 0 the transition is instantaneous and may cause an audible pop, especially on sustained sounds.

Signature

static ENGINE_API void ClearSoundMixClassOverride(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier, class USoundClass* InSoundClass, float FadeOutTime = 1.0f);

Parameters

Name Type Description Default
WorldContextObject const UObject* Object used to resolve the current world. —
InSoundMixModifier class USoundMix* The Sound Mix asset whose class adjuster should be cleared. —
InSoundClass class USoundClass* The Sound Class whose override should be removed from the mix. —
FadeOutTime float Seconds to interpolate from the override values back to base values. 1.0f

Return Type

void

Example

Restore music class after cinematic C++
// After a cinematic lowered music volume via SetSoundMixClassOverride,
// restore it over 2 seconds when the cinematic ends.
UGameplayStatics::ClearSoundMixClassOverride(this, CinematicMix, MusicClass, 2.0f);

Version History

Introduced in: 4.11

Version Status Notes
5.6 stable —

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.