RealDocs

UAudioComponent::GetCookedFFTDataForAllPlayingSounds

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

Description

Retrieves cooked FFT spectral data separately for each sound wave currently playing on the component, without averaging across sounds. Returns true only if data was found and the component is playing.

Caveats & Gotchas

  • Requires the playing USoundWave assets to have cooked FFT analysis data baked in via the Sound Wave's baked analysis settings — sounds without it are simply omitted, and the call returns false if none have data.
  • Unlike GetCookedFFTData, this does not average or interpolate across multiple simultaneously playing sounds; use GetCookedFFTData if you want a single blended result instead.
  • Only works with the audio mixer backend.

Signature

bool GetCookedFFTDataForAllPlayingSounds(TArray<FSoundWaveSpectralDataPerSound>& OutSoundWaveSpectralData)

Parameters

Name Type Description Default
OutSoundWaveSpectralData TArray<FSoundWaveSpectralDataPerSound>& Receives per-sound-wave spectral data for every sound currently playing on this component.

Return Type

bool

Example

Per-sound spectral visualizer C++
TArray<FSoundWaveSpectralDataPerSound> SpectralData;
if (AudioComponent->GetCookedFFTDataForAllPlayingSounds(SpectralData))
{
	for (const FSoundWaveSpectralDataPerSound& Entry : SpectralData)
	{
		// Use Entry.SpectralData to drive a per-layer visualizer
	}
}

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.