Audio Randomly Cuts Out

Hi all,

I’m new to Unreal and Metasounds, I think I’ve done everything right with the set up of spatialised loops, reverb zones and footstep sounds. But upon playing, each element slowly stops working.
E.G: 3D sea-wave sounds start out working, I walk towards them and the attenuation works but after about 30 seconds of walking around the coastline - they suddenly cut out mid-sound and refuse to play again even though they are looped and placed around the map. This then snowballs to other sounds like the footsteps and the jump sounds leaving the game world almost bereft of sound until I stop and press play again.

Any idea on what I could’ve done wrong to cause this?

1 Like

I don’t know what your problem is, but to debug it, you might want to use the console command:

au.debug.soundwaves 1

See if you are exceeding 32 active sounds and if so, eventually these sounds you want playing persistently are being culled and not restarting. That could be caused by sounds you assume are being culled, aren’t, and are still active.

If you have no additional sounds other than a couple, this is not the problem.

4 Likes

Thank you for your reply! Is there any way to stop this from happening if I have 32 sounds active?

I’m just there myself right now and the answer is extremely complex. Prioritization of certain sounds is fundamental and I have been experimenting with that. For example, I consider that our theme music, player’s weapon sounds, and footsteps are never to be allowed to drop out and have included those in a 2d Metasound that is prioritized such that it can’t drop out.

Also, some sounds that should not be allowed to bump others out, have to be limited in how many copies should be running at one time. An example of these are bullet hits near the player (ricochets and actual hits). I found that these were tying up an inordinate number of slots if numerous enemies were targeting player at one time. I was able to reduce their impact by setting a Max Count in the Metasound Concurrency section so that instead of 20 bullet impacts tying up slots, I allowed only 2 to exist at one time.

For anything that can be 2D, grouping together, even unrelated sounds, into a single Metasound seems to allow several sounds to use only a single slot. If they have the same attenuation from a listener/player perspective, grouping those sounds saves slots. An example would be each NPC’s weapon sounds and footsteps. They are dissimilar in every way except that player hears them from a certain direction. By using a single metasound for both (complex since those sounds are heard at different distances and the metasound has to handle the attenuation/spatialization explicitly) I saved many channels when several AI are present.

I’m just learning, though I have a lot more I’m trying to figure out now. Trial and error is the only tutorial I’ve found if you reject (as I do) using any parts of the ue4 traditional sound methods. I’m putting as much into Metasounds as possible to eliminate the severe problem that Sound Cues create by having each named wave tie up a slot even if mixed down (in the old sound cue method). I’m also avoiding the old stuff because it’s so difficult to deal with deprecations, thus I’m trying to guess which components will be deprecated sooner rather than later.

Another important thing that can be done is to make certain that sounds which are not actually in range to be heard, are bounced out of that list until they are heard. An example of this was several generators running in the level which are only supposed to be heard if you are within 10 meters, yet they turned out to be tying up a slot even when not heard. I don’t recall at the moment what I did to get this working but will research it. I’ll have to get back to you if this is of interest because I did several things some of which were not relevant. The bottom line is that you don’t want continuous sounds staying alive when they aren’t actually heard. It’s easy to fix too, just don’t remember since there are so many settings and components involved.

3 Likes

Thank you so much! I’ll try and see what I can do about concurrent sounds. Would this include the “Play when silent” sounds such as attenuated 3D loops or not? If not, I think that this may be the issue!

Would the “Prime on load” setting have anything to do with it?

Others would know more about that, but I got the impression that refers to priming the audio buffers so dropouts don’t occur? Just a guess.

As to your other question, in reference to the example I gave about the generators, I use Restart rather than Play When Silent, so the sound fires back up after it “virtualizes” (I use quotes because the term is not descriptive nor defined, but seems IMO to mean it’s trashed temporarily for a variety of reasons including player/listener has gone out of range).

This whole issue of exceeding the number of channels is big. Deciding what sounds are expendable and then making sure they are prioritized. We just made up a list of the types of sounds we have and their priorities. Now I’m going through and attempting to make sure the priorities are honored. This isn’t all that clear to me yet, because it appears there is volume prioritization that somehow works hand in hand with explicitly specified priorities. There is also still the fuzziness of how the Metasound priority relates to the submix priority and which wins if there is a conflict. Still trial and erroring that stuff.

1 Like

Thank you so much! The audio debug fixed it because it told me what was up! I appeared to not have completed each footsteps circuit. So every time the player stepped it added to the concurrent sounds list - adding up to 32 very quickly!

1 Like

Glad to hear it helped you as much as it does me.

Hey! I recently upgraded my session to 5.1 and I’m getting the exact same issue where Footstep sounds are building up and never getting culled.
Eventually all audio cuts out and the session freezes.

How did you fix this? What do you mean by “footstep circuit”
Are you talking about your metasound on finished pin? Or walking/running animations?

Hoping you can help! I’m not sure what you did on your end to get it working.
Thanks in advance!

Awsome, this helped so much!

It is late, I know. But who know maybe someone will face this problem in the future.

So - how I’ve fixed this for myself?

Little thing I forgot to do is to pin the On Finished to Output. That’s all.

Since I did this - the problem is gone.

Yep, that simple. Yep, it took me like 3 hours to fix. I’ve literally tried everything, btw, do not set max channels to 9999999999 or something like that - you wont be able to open Unreal Engine again until you delete the DefaultEngine.ini file.

1 Like