You misunderstand the hang part, it’s ensure being triggered. It works as assert but insted of crashing it just dumps memory (which is what hangs editor) and drops crash log to log. If you have ensure or asset fail then look on code location it gives you for you to understand whats wrong.
That ensure is being triggered because unimplemented GeneratePCMData is being called, which originally been made by procedural sound in old sound system. There also note there:
/**
* This is only used for DTYPE_Procedural audio. It's recommended to use USynthComponent base class
* for procedurally generated sound vs overriding this function. If a new component is not feasible,
* consider using USoundWaveProcedural base class vs USoundWave base class since as it implements
* GeneratePCMData for you and you only need to return PCM data.
*/
virtual int32 GeneratePCMData(uint8* PCMData, const int32 SamplesNeeded) { ensure(false); return 0; }
Included with condition you should have a call stack showing what exacly is calling that function
Im actully not sure how unsure behaves in shipping build, you need to check it out. But i susspects it does may not hung,
AudioDevice->StopAllSounds(true)
is not needed as far as i know, i used this without it and it worked fine.