AudiokineticのコミュニティQ&Aは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.
Brian T. (100 ポイント) 2017 7/12 質問 General Discussion

回答 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.
Deepak Chennakkadan (1,830 ポイント) 2017 8/26 回答
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.
...