How to read raw data from USoundWave?

The SoundWave I have is contained in a AudioComponent which resides in a AmbientSound.

The USoundWave object has a few properties share similar names, such as RawData, RawPCMData, ResourceData.
Each attribute has a corresponding *Size attribute. The sound playback is normal. However all these *Size attributes are 0.

What is the appropriate way to read uncompressed raw audio data? What are the differences among these *Data attributes of SoundWave?

You might want to have a look at USoundVisualizationStatics, in the SoundVisualization module.

However I’m pretty sure that the method used is not valid for cooked build, precisely due to the way it accesses the audio data.

For now I’m not sure any clean way exists to access the audio data, a feedback from Epic would be welcome.