Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

0 votes
I am having performance issues with Queries in the SDK. Whenever I call a Query function, my game thread will stall for a few milliseconds. Is there something I can do?
in General Discussion by Moderator (Audiokinetic) (490 points)
edited by Moderator (Audiokinetic)

1 Answer

+2 votes
 
Best answer
Most calls in the AK::SoundEngine::Query namespace acquire the global sound engine mutex, which can be held for several milliseconds by the sound engine thread. It is therefore recommended to register a AkGlobalCallbackFunc (using AK::SoundEngine::RegisterGlobalCallback) and do the Queries from there, as your function will then be called at each audio frame from inside the audio thread, already holding the mutex.
by Moderator (Audiokinetic) (490 points)
selected by Adrien L. (Audiokinetic)
...