Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Calling Stop events of looping sounds - specifically in UE4.

0 votes
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).
asked Mar 7, 2018 in General Discussion by Mirren MN (110 points)

1 Answer

0 votes
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.
answered Mar 25, 2018 by Radek Karnik (990 points)
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 :)
...