UAudioComponent::GetCookedEnvelopeData
#include "Components/AudioComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Retrieves the amplitude envelope value at the current playback time, averaged across all sound waves currently playing on the component. Returns false if no cooked envelope data was found.
Caveats & Gotchas
- • Requires the playing sound wave to have cooked amplitude envelope data enabled in its analysis settings — check HasCookedAmplitudeEnvelopeData() first, otherwise this always returns false.
- • When multiple sound waves are playing simultaneously, the returned value is an average, which can mask per-sound peaks; use GetCookedEnvelopeDataForAllPlayingSounds for a per-sound breakdown.
- • The Blueprint node is labeled "Get Cooked Amplitude Envelope Data", not the C++ function name.
Signature
bool GetCookedEnvelopeData(float& OutEnvelopeData) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| OutEnvelopeData | float& | Receives the averaged amplitude envelope value across all currently playing sound waves. | — |
Return Type
bool Example
Driving a VU meter C++
float EnvelopeValue = 0.0f;
if (AudioComponent->GetCookedEnvelopeData(EnvelopeValue))
{
UpdateVUMeter(EnvelopeValue);
} See Also
Tags
Version History
Introduced in: 4.25
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?