"On Finished" for short audio clips

I didn’t seem able to find an answer to this via searching but have recently gotten confused. If I have a footstep or some short audio, do I need to actually use the on finished node or does the sound stop when then audio file reaches it’s end?

1 Like

If it’s not a looping sound it will stop when it reaches the end. Spawned sounds will also by default destroy themselves on finished. Is that the information you were after?

1 Like

That does clarify some things, but I guess I’m more so asking if I should be using “On finished” for everything that is not looping. I assumed that once the audio file ends, it is not longer being “played” or taking up memory.

Someone mentioned using On Finished for some of my one shot type audio and I never do, so I was starting to second guess myself.

Okay so are you talking about within say a Metasound Source file? In that case yes, if you have a Metasound source that plays a Wave Asset and has the Oneshot interface (default) then yes when all the logic has finished you should hook it into an On Finished output.

This tells the engine that the sound is finished and can be removed from memory. If you don’t do this it will still be present as a voice, and you start getting into virtualization and such which is out of scope for this question.

If you are talking about a simple .wav spawned sounds in blueprint, without all the fancy Metasound logic (you can still play Metasounds through this method, in which case I believe the On Finished overwrites this behaviour but don’t quote me) then by default Auto Destroy will be true and that will take care of removing the sound for you.

So yes if using Metasound and you can hook into On Finished then you should, if you’re spawning, it should (unless specified) auto destroy the sound.

2 Likes

Thank you for this clarification! I only worked on small scale prototypes and projects with MS so I never ran into those issues but good to know!

1 Like