Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. Contact Sales if your project requires a support plan.

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 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 by Deepak Chennakkadan (1,210 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.
...