menu
 

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

0 投票
I've got a looping sound in Wwise which is set to loop infinitely. I have two separate events - one that simply plays the loop sound and other one just stops it.

I call the play event from Unreal Engine which works fine but when I call the stop event the sound doesn't stop. Doesn't work for 2D or 3D sounds.

Is it possible to call stop events on looping sounds? If not, is there a different/best practice way to stop looping sounds? (i.e less convoluted than setting volume to 0 and then destroying the object).
分类:General Discussion | 用户: Mirren MN (110 分)

1个回答

0 投票
Hi! Are you sure that you call the stop event on the same object you started the sound from? Or you can change the stop event's scope to "global" so it will stop the sound on every object.
用户: Radek Karnik (990 分)
Hey :)
I had two separate events - one to play (worked fine) and another to stop. Both referencing the same SFX object.
Does the stop event have to be on the same play event? I thought calling an event laid out like that would just play then immediately stop it...
I don't mean same SFX object in Wwise but same game object in your UE project. You can (and should) do it using two separate events in Wwise. I am not sure how UE works but if it's the same like in Unity, you have to call both events on the same game object in your scene or set the scope of your stop event in Wwise to "Global" (there is a column for it in event editor in Wwise). If you do it the second way, it will stop all referenced events playing on all the object in your scene.  Another way to Stop all sounds is to call ak.soundengine.stopAll from the code on given object. Hope it's clear :)
Thank you so much for this answer! Had an audio bug I was trying to fix for weeks and this answer fixed it for me :)
...