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.

Registering a callback for audio amplitude RTPC changes

0 votes

We use the audio amplitude RTPC to drive the mouth for behemoths and and a few other cases however querying an RTPC can cause some substantial hitches. We internally tweaked the Wwise code to return busy when we couldn't acquire the main lock to avoid the hitch and use a cached value instead but this is giving us really poor results.

Would it be possible to register a callback for a game object that can be called when an RTPC changes during the RenderAudio for the game?

asked Jul 3, 2019 in Feature Requests by Brent S. (140 points)

1 Answer

+1 vote
Hello Brent,

This is because in order to use this functionality you must acquire the mutex that wwise requires during the process of rendering audio. Trying to acquire this lock and bailing if you can't ( as I assume you doing based on what you say ) will at least avoid the contention that causing your hitches. This does however suffer from a potentially very stale value if you fail to acquire the lock for a long period of time.

Another thing to consider is that global callbacks issued by wwise are ensured to issued at a point where this lock is not under contention making the call relatively cheap, if your usage can be adapted to get the value in a global callback this might a good solution.

That being said I personally prefer using a dedicated callback. I would be happy to discuss with you how to do this over email dan@oticsoftware.com.

Best,

Dan Murray
answered Jul 3, 2019 by Dan M. (2,660 points)
Thank you for the suggestion! This did the trick. I agree a direct callback would be more elegant but that may have to wait in the queue for a bit for me at least ;) It would be useful to know if such work were done whether AK would be interested in taking such a change back.
...