SynthComponent does not execute OnStop() after calling Stop().
OnStop() will be called in PumpPendingMessages() via OnGeneratePCMAudio(). But after stopping the AudioComponent, the procedural SoundWave won't call GeneratePCMAudio() anymore. Therefore, the pending ESynthEvent::OnStop will be executed only after Starting TimeSynth again. As a sideeffect "bIsSynthPlaying" will stay true indefinitely.
User suggested fix: To prevent this, we could use OnEndGenerate() only to set bIsSynthPlaying, and maybe remove OnStop(). Because procedural USoundWave does not have an OnStop() function which will be called before OnEndGenerate().
Synth Example Project has been attached for repro sample.
Result:: in some cases when Stop() internally calls AudioComponent->Stop(), OnGenerateAudio won't pump pending messages in Time. In this case you will see:
Expected: The following sequence in the Output log:
Note: (Please see attached mp4 for more details)
There's no existing public thread on this issue, so head over toAnswerHub just mention UE-85093 in the post.