Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. Contact Sales if your project requires a support plan.

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 in General Discussion by Mirren MN (100 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 by Radoslav K. (350 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 :)
...