RealDocs

UAudioComponent::PlaybackCompleted

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

Description

Static callback invoked by the audio engine when an active sound tied to an audio component finishes playing or fails to start, used to look up the component by ID and forward completion handling such as broadcasting OnAudioFinished.

Caveats & Gotchas

  • Static and keyed by AudioComponentID rather than a direct pointer because the callback can arrive from the audio render thread after the originating component may have been destroyed — it safely no-ops if the ID no longer maps to a live component.
  • There's also a private, non-static overload (PlaybackCompleted(bool)) called on the resolved component instance; the static overload is the entry point the audio engine's active sound cleanup actually invokes.
  • Not Blueprint-exposed; gameplay code should bind to OnAudioFinished or OnAudioFinishedNative instead of calling this directly.

Signature

static void PlaybackCompleted(uint64 AudioComponentID, bool bFailedToStart)

Parameters

Name Type Description Default
AudioComponentID uint64 ID (from GetAudioComponentID) of the audio component whose sound finished or failed to start.
bFailedToStart bool True if the sound never actually started playing (e.g. its voice was stolen or it failed to initialize) rather than completing normally.

Return Type

void

Example

Engine-side completion callback C++
// Invoked by the audio engine when the ActiveSound tied to this component's ID finishes
UAudioComponent::PlaybackCompleted(AudioComponent->GetAudioComponentID(), /*bFailedToStart=*/false);

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.