Returning 0 bytes in GeneratePCMData results in the procedural sound wave not continuing to play audio. Instead of returning 0, we need to return an empty buffer if the procedural sound wave doesn't have audio ready to generate (due to loading or some other issue).
Note that it is common practice to override GeneratePCMData for Procedural Sound Wave implementations. This fix will only fix implementations that don't override GeneratePCMData.
1. Make a procedural sound wave in C++ which generates a sine wave tone.
2. Implement an actor component which has a ptr to the procedural sound wave
3. Add a BP function which plays the procedural sound wave
4. In BP, add the new component to an actor and call the BP function which plays the procedural sound wave.
There's no existing public thread on this issue, so head over toAnswerHub just mention UE-34081 in the post.