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.

PostEvent inside Update function?

0 votes
How would one handle a PostEvent inside an Update function? I am trying to implement footsteps but they are playing too consecutively fast. Is there a way to determine when the audio clip has finished or is playing? Thanks.
asked Jul 12, 2017 in General Discussion by Brian T. (100 points)

1 Answer

+1 vote
Hey,

The API call to determine if a clip has finished playing is as follows:
        AK::SoundEngine::PostEvent(AkUniqueID, AkGameObjectID, AK_EndOfEvent, MyCallbackFunction);

You can also try limiting the amount of instances by going to the Advance Settings tab of your Wwise object in the Authoring app. There, you will find an option to limit sound instances on a global scale.
answered Aug 26, 2017 by Deepak Chennakkadan (1,830 points)
Also for integrating footsteps I synced it up with the animation frames of the character. So I basically call PostEvent every time it hits the frames when the player lands his foot on the ground in the animation itself.
...