RealDocs

UAudioComponent::SetPlaybackTimes

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

Description

Sets the audio-thread playback time per sound wave, used to synchronize baked FFT or envelope-follower analysis data with actual playback position.

Caveats & Gotchas

  • Internal engine plumbing — only relevant when the component is using baked (cooked) FFT or envelope data, since that's the only consumer of these playback times.
  • Not Blueprint-exposed and not intended to be called from gameplay code; it's invoked by the audio engine as sounds progress.

Signature

void SetPlaybackTimes(const TMap<uint32, float>& InSoundWavePlaybackTimes)

Parameters

Name Type Description Default
InSoundWavePlaybackTimes const TMap<uint32, float>& Map of sound wave hash to current audio-thread playback time in seconds.

Return Type

void

Example

Recording a sound wave's playback time C++
TMap<uint32, float> PlaybackTimes;
PlaybackTimes.Add(SoundWaveHash, CurrentPlaybackTimeSeconds);
AudioComponent->SetPlaybackTimes(PlaybackTimes);

Version History

Introduced in: 4.25

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.