Description

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.

Steps to Reproduce

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.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-34081 in the post.

0
Login to Vote

Fixed
ComponentAudio
Affects Versions4.124.13
Target Fix4.13
Fix Commit3081383
Main Commit3092051
Release Commit3081383
CreatedAug 2, 2016
ResolvedAug 9, 2016
UpdatedJun 23, 2018