Is it necessary to destroy spawned sounds after playback?

And how to monitor how many sounds are in the level that aren’t active?

No, they will be destroyed at some point by Garbage Collection.

Thanks! That makes life easier.

If you need a fire and forget sound, you should not Spawn the sound but simply Play the sound (just be aware that you can’t do anything to the sound afterward as there will be no Audio Component).

Play Sound At Location instead of Spawn Sound At Location, then you don’t have to worry about Audio Components lingering around the level on sounds that aren’t looping.

I’m spawning a dialogue at location with built in subtitles but for some reason the subtitles are disappearing from time to time and then reappearing in mid sentence… I’m using 4.15.

EDIT: I am binding an event to spawn the next dialogue on Audio Finished maybe that’s the source of the problem…

If the audio level is going to 0.0, the audio engine by default will stop playing the file.

This could also happen if the Audio file loses priority and drops below the Max Channel count on the Active Sounds list.

Do you think that’s what’s happening?

The level is quite empty audio wise. I think it might be due to subtitle priority being the same default value for all dialogue files but it confuses me that there is a Subtitle section in the Sound Wave file when the spoken text is being pulled from Dialogue Wave.

As far as I know, the Subtitles ONLY play when the Sound plays. If the sound doesn’t play for any reason, the Subtitle won’t play. Ideally, it would be nice for those two systems to be separate.

The audio plays perfectly every time. I think that this is a bug in the editor for 3 reasons.

  1. The subtitles seem to appear perfectly the first time I play in editor
  2. Shipping build displays subtitles correctly every time (5 tests done)
  3. Launching standalone game also has no issues with the subtitles but more tests are needed to be sure

Seems like this is a known issue:

Interesting that it’s a PIE-only issue. Could be a bug in the subtitle manager not playing nicely with the mutliplicities of audio devices in editor mode. To support multiple PIE modes in editor, each PIE window creates a new audio device instance. It could be that there’s some thrashing or other issue with the subtitle manager (i.e. it’s not written to handle multiple audio devices). We should reopen that issue.