How to access USoundWave PCM data

Is there any way to access the PCM data of a USoundWave object which will work both in editor and packaged builds?

I have looked at how the PCM data is retrieved within the USoundWave::GetImportedSoundWaveData function. However, since this is an editor only function and so is the data it uses, I am hoping there is another way of accessing it which does not require the project to always be unpackaged as I will need to use it in both scenarios.

I would appreciate any input on this issue, thanks in advance.

Perhaps you could use

const uint8* USoundWave::GetResourceData() const
{
	check(SoundWaveDataPtr);
	return SoundWaveDataPtr->GetResourceData();
}

It seems to be out of the scope of editor only functions.

Also this thread might be of interest

1 Like