Is FAudioThread::RunCommandOnAudioThread executing synchronously?
I've just updated a project to Unreal 4.16. This version forces me to call ome methods on the AudioThread and some others on the GameThread. To do that I used
I need to use on the GameThread the result of the command executed on the AudioThread. To do that I imagined, maybe wrongly, that it was necessary to use some synchronization constructs in order to have the GameThread waiting the command executed on the AudioThread.
I tried to log something:
The result is sometimes I have "One Two Three", sometimes "One Three Two". So I think the GameThread is not waiting for the AudioThread's command. The problem is that, if I use some synchronization constructs (a Semaphore for example), the GameThread become stuck. I see "One Two" and nothing else...
So, what's the real behavior of RunCommandOnAudioThread?
Follow this question
Once you sign in you will be able to subscribe for any updates here