USoundWave
#include "Sound/SoundWave.h" Description
A raw audio asset imported from a WAV file. Playable directly or embedded in a USoundCue. Controls codec selection, looping, streaming, and baked analysis data.
Caveats & Gotchas
- • bLooping only applies when the USoundWave is played directly. Loop behavior inside a SoundCue is controlled by SoundNodes in the cue graph.
- • Stream caching (LoadingBehavior) can be set per-wave or inherited from its SoundClass. ForceInline keeps audio fully in RAM; RetainOnLoad eliminates first-play hitches but is memory-expensive.
- • ADPCM and PCM codecs ignore CompressionQuality. ADPCM provides ~4x compression with fixed quality; PCM is uncompressed with the lowest decode cost.
- • Baked FFT and envelope analysis (bEnableBakedFFTAnalysis, bEnableAmplitudeEnvelopeAnalysis) are editor-only cook settings — enable them before packaging to use the cooked data at runtime.
Example
Play a sound wave at a location C++
UGameplayStatics::PlaySoundAtLocation(this, MyFootstepWave, GetActorLocation()); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?