Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes

关于检测是否重复播放:比如一个角色的好感度语音,在玩家点击播放好感度语音后,再次点击不会重复播放该音频,而是等待该次语音播放完毕以后,再播放相同音频(但一些普通音效,则不提供检测是否重复播放该音频的需求)

那么我需要检查该音频是否处于播放状态,或者知道这个事件到底持续多长时间然后自己计时

PS:以上必须要在Runtime运行时情况下能生效的方法才行

in General Discussion by 世浩 (120 points)

1 Answer

+2 votes
Hi 您好,

如果我没理解错的话,您想实现的是在一个声音已经播放时,若重复触发事件则不会打断该声音,直至播放完成才可继续播放对吧?

建议您尝试一下:

Wwise authoring工具中可用的方法:
    部分语音的playback limit可采取特定设置——如果一个内容没有播放完,则新voice产生就销毁新voice,直到旧有voice播放完毕,则可再次播放该voice
    实现方法是是针对需要设置的语音,在Wwise创作工具中设置其Advanced Settings,启用Limity sound instances to:,可设置为1 Globally(也可选择1 Per Game Object,依据您的实现方式而定),然后When Priority is equal:选项选Discard newest instance

利用PostEvent API及事件回调方法:
    可以PostEvent之后设代表播放状态的bool为真,当该bool为真时不再调用此类事件,利用事件的endofevent回调来设置代表播放状态的bool为否
by Hou Chenzhong (Audiokinetic) (6.0k points)
...