RealDocs

UAudioComponent::GetCookedEnvelopeDataForAllPlayingSounds

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

Description

Retrieves the current-time amplitude envelope value for each sound wave playing on the component individually, without averaging across sounds.

Caveats & Gotchas

  • Requires cooked amplitude envelope data to be baked into each playing sound wave; sounds without it are omitted from the result.
  • Use this instead of GetCookedEnvelopeData when you need to distinguish envelope values per layered sound rather than a single blended value.

Signature

bool GetCookedEnvelopeDataForAllPlayingSounds(TArray<FSoundWaveEnvelopeDataPerSound>& OutEnvelopeData)

Parameters

Name Type Description Default
OutEnvelopeData TArray<FSoundWaveEnvelopeDataPerSound>& Receives the current-time envelope value for each sound wave playing on this component individually.

Return Type

bool

Example

Per-layer envelope visualizer C++
TArray<FSoundWaveEnvelopeDataPerSound> EnvelopeData;
if (AudioComponent->GetCookedEnvelopeDataForAllPlayingSounds(EnvelopeData))
{
	for (const FSoundWaveEnvelopeDataPerSound& Entry : EnvelopeData)
	{
		// Drive a per-layer visualizer from Entry.EnvelopeData
	}
}

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.