在 Audiokinetic 社区问答论坛上,用户可对 Wwise 和 Strata 相关问题进行提问和解答。如需从 Audiokinetic 技术支持团队获取答复,请务必使用技术支持申请单页面。

PostEvent inside Update function?

0 投票
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.
最新提问 7月 12, 2017 分类:General Discussion | 用户: Brian T. (100 分)

1个回答

+1 投票
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.
最新回答 8月 26, 2017 用户: Deepak Chennakkadan (1,830 分)
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.
...