Audiokinetic Wwise Knowledge Base

Thread safety and the sound engine API's functions and callback notifications

Whenever you call a function on the sound engine's API, you actually push a command into a queue. Even AK::SoundEngine::RenderAudio() simply pushes a message "process previous commands" into the queue. These commands are consumed and processed by another thread, the audio thread, which is synchronized with the audio driver.

You don't need to enclose any call to the sound engine into critical sections, because the commands are pushed internally into a thread-safe queue. However, the callback notifications are called by the consumer (audio) thread. Therefore, all objects shared by your game that you access there need to be protected with critical sections.


Article Details

Last Updated
26th o March, 2008

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Continue