RealDocs

UAudioComponent::AdjustVolumeInternal

function Engine Since unknown
#include "Components/AudioComponent.h"
Access: public

Description

Shared implementation behind AdjustVolume, FadeIn, and FadeOut that queues a volume interpolation on the component's active sound.

Caveats & Gotchas

  • Not a UFUNCTION and not Blueprint-callable — call the public wrappers AdjustVolume, FadeIn, or FadeOut instead of this directly.
  • bIsFadeOut changes internal bookkeeping (e.g. sets bIsFadingOut) in addition to driving the interpolation curve, so calling it directly with the wrong flag can desync the reported play state.

Signature

void AdjustVolumeInternal(float AdjustVolumeDuration, float AdjustVolumeLevel, bool bIsFadeOut, EAudioFaderCurve FadeCurve)

Parameters

Name Type Description Default
AdjustVolumeDuration float Length of time, in seconds, to interpolate between the current volume and AdjustVolumeLevel.
AdjustVolumeLevel float The target volume multiplier to interpolate to.
bIsFadeOut bool Whether this adjustment should be treated as a fade-out, affecting internal play-state bookkeeping.
FadeCurve EAudioFaderCurve The interpolation curve to use between the old and new volume.

Return Type

void

Example

Direct volume interpolation C++
AudioComponent->AdjustVolumeInternal(1.5f, 0.25f, /*bIsFadeOut=*/false, EAudioFaderCurve::Logarithmic);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.