UE4.25 Audio Engine Bugs - Update from 4.22 - need help!

My project update from 4.22 to 4.25. Every thing is fine on 4.22. But I must to update to 4.25 now for Apple’s new requirements.

The sounds works fine in windows UE4 Editor as befor (4.22) but totally different in iOS device. When package to the device, the sounds is strange, lags, just like overloaded, the background sound cut off and cut in seem interrupt by another sound.

If only a few sounds in the game, this bug will not noticed. When the game has lots of sound effect with a background music, like a FPS War game, it is very clearly and not acceptable.

I have worked for this bug for sever days, still not find any way to fix it. But I have some things confirmed:

  1. It’s not about Max Channels, set it to 128 not fix it. (there is another 4.25 Audio Max Channel issue I put it below)
  2. It’s not about sound cue priority, I have changed all sound cues to default priority, not fix it.
  3. It’s should not affect by the FPS frame rate, in 4.22 even FPS drop to 10 the sound cue not like this.

It seem the Audio Engine has a buffer, and it is very small in iOS, easy to be overload, but how to fix it? Any magic settings I didn’t know for iOS Audio?

I find some one already find this bug in UE4.23 in this thread: https://forums.unrealengine.com/development-discussion/audio/1667019-possible-audio-bug-in-unreal-engine-4-23
And the found way to fix this bug is to change all the sound wave to 5.1 format, I don’t konw. I think there should be a better way.

What happend to the Audio Engine after 4.22? Please fix it as soon as possible for iOS developer, because every one need to update to 4.25 now to publish an iOS project.

UE4.25 Audio Max Channel issue: The ProjectSetting-Audio-Quality-MaxChannels not working as before, in 4.22 change this setting to 64 affect both Editor and iOS device. The good news is I still can use Platforms-iOS-Audio-Max channels for iOS device now. But still not find how to change it for Editor. I don’t know if it is a bug.


I find this settings cound worked for this bug. (pic is default,a lot of 0 here, but those 0 is not actually 0, it just means there is another hiden default value somewhere. don’t change it if you didn’t konw what U R doing…)

I guess this bug is caused by the hiden default value. I think they are underestimated, it should keep the consistency to earlier to make the update easier.

OK, now I need to change this value. This Documentcould be helpful. But I think I need to try each of them now for my project.

Just to clarify, you had 128 simultaneous voices working on your iOS game?

Hi Dan,

No. I think 32 is enough, and I find if set it to 128 may cause lag too on iOS. So I did some work to prevent it happens.

I find when I update to 4.25 **some but not all of **sound cue have a checked setting-override concurrency under Voice Mananement, I didn’t check this myself in 4.22. I didn’t know why they are turn on.

After many times of test on both iPhone and iPad, I did some change on iOS settings like this:

ios.PNG
This changes worked, the problem has some improvement but still not good enough. Any Suggestion?

Base on this settings, go on tried a lot:

  1. turn off all sound cue Attenuation
  2. Prime all short sound cue
  3. Retain all short sounds wave
  4. PreLoad sound cue
  5. Use Stream Caching (Experimental)

After all, it is a little better but still not good enough. And the fixed result is not stable, that’s annoy. Some times iPhone gets right but iPad wrong.

I had a long struggle with this settings but stll not find a perfect fix.

Why it is all right on the windows Editor but laggy on iOS. Any body konws?

I can tell it must be something wrong on iOS settings, something like: buffer, memory, cache or something background method wrong.

I hope it could be found out and fixed soon.

1024 buffers x 8 = 8192 frames. That’s like > 170ms latency!

Our max channel count on our iOS titles is pretty low–like under 20. And we take advantage of Priority and Concurrency to make sure the sounds that we do hear are the sounds we need to hear.

Thanks Dan.

You are right, it did cause latency. I delete all changed settings in DefaultEngine.ini, let the default values work.

Now I am working on the cache perload and Concurrency to relieve the max load of the Audio Engine. I think Maybe I just got too much to the Audio Engine, but it’s all right to the 4.22, In 4.25 it needs more works.

It’s not a bad thing for me, I learned something from it. Hope it wiil be great after all.

By the way, UE5 is revealed, I saw the PS5 demo, All dynamic in real-time, I think it’s great because it makes things easier.

Hi Dan,

I did some Priority and Concurrency work and now there is only 16 channels max, and every thing preload every sound primed in the cache, it always works well on windows Edit but still sound **laggy **and **unstable **on iOS device.

I’m pretty sure the new audio engine has some thing wrong with iOS. Could you start a audio test on iOS? like a stress test?

With Stream Caching, if you’re priming every sound then you’re probably blowing your cache. You should only prime sounds that MUST be time critical. Don’t prime sounds where it doesn’t matter if they lag.

I tried Stream Caching, and I primed every sound on demand, it’s not fix this bug, so I leave it back bacause it is a experimental setting, I didn’t want anything uncertain when I tring to fix a problem.

If you didn’t try it on an iOS device, I can discribe this bug exactly for you: just image when you playing a shooting game and there are many shooting sound effects and the back ground music, you can notice all of the sounds (the back ground music is mostly noticeable) are cut off every 1-5s once, and get back 0.2-1s after that. Sounds off and on like overloaded. And it only happens when running on an iOS device.

And I found another bug: concurrency settings (Just like: Resoluton Rule = Stop Oldest) has a very different result on iOS device than Editor. What break the Audio Engine’s consistency on iOS?

Have you tested it? If you had trouble with 4.25 remote build to iOS, Yes it is a bug, but I find a way to fix it you can found in this thread, I don’t know if this 2 bug related. it’s about UE4Rules.dll

Finally I think I got to konw what is this BUG exactly. It’s not about those settings, I was confused by this bug to make me believe change any settings cound fix it.

Today I cleared all the changed settings to the default and remote build again, delete old app on device, reinstall it. I am so surprised every thing is as good as before in the 4.22. But after a while when I restart the app, it lags again. And then I killed the app wait a few second (let the memory released) and reopen it every thing works well again.

So it is not just like overloaded, it is overloaded because the problem of the Memory Recycle (memory leak or something like that). After a havey load of sounds the sound lag begins, the game render is not lagging just the sound lags, so the most likely possibility is the Audio Engine’s memory has a recycle issue.

After all, there is only one question: How to fix it? Any way to release audio memory var blueprint? Any ideas?

My project has a big delay since update to 4.25. Really need a quick fix on this. This is my audio and memory info for reference:

​​​​​​​

**Please **HELP!

Yeah, I recommend reducing the number of voices you’re trying to play at once. There are a variety of mechanisms to do this. Concurrency, Priority, Max Channel Count. Additionally, you can take advantage of Quality settings to create branching in your SoundCue nodes for reduced versions on mobile platforms.

For example, instead of a gun having several simultaneous sounds, as you would design for PC or console, you can use a consolidated version for iOS. You can also scale quality down for iOS reducing the codec fidelity by a factor and shrinking the memory footprint.

Finally, you can take advantage of Soft Object References to more manually load and unload sounds as needed to reduce the likelihood that too many sounds are getting loaded when you don’t need them.

Every game is different, so your mix and match of solutions will be unique to your specific games’ needs.

I have this exact same issue. I also noticed it after updating from 4.22 to 4.24, it remains in 4.25. Currently I have max channel count at 12 and am not using any sound cues with any branches at all (just single wavs). The issue crops in over time, after about 5 minutes of play the background music starts cutting in and out and by 8 minutes or so of play the audio cuts out nearly entirely. Even when background music is the only audio it doesnt hardly play at all.

Background audio is priority 1 and all other sounds 0

I have not touched concurrency settings yet

All audio is 2d (not spatial), there is rarely more then 3 wavs played at once. After about 8 minutes of play background music (without any other sounds playing) has cut out nearly entirely.

frame rate stays above 45, audio cut out does not appear to effect frame rate or vice versa

once audio is all screwy, if i turn the app off for a few minutes and turn it back on it works again until another 5 minutes of play and then starts cutting again. I am testing on iphone 6

One thing I Think ive noticed is that I have a specific widget that if I open it, the audio seems to go down hill from there (even after closed). The widget has no audio or anything but it seems like after this specific widget has been opened the audio gradually starts breaking up over time. Maybe try a test build of your game with no widgets or menus?

Hi Dan & Allenheathx,

Thanks for your good advice.I did a minimum sound test, only a few sound played at once but the sound lag still happens just like what Allenheathx said. I think the sound lag is not caused by too many sound playing at once. The lag will always happen after a while of playing.

I think it is a memory leak when the engine running on iOS. The lag happens when the audio memory is full and starting to recycling. Normally it will not cause sound lag. It must be something wrong. And it is engine related, remember we won’t have this bug on 4.22 to iOS12 on the same project.

I still working on this bug. And I will make a demo to show how this bug happens. I am not a engine level developer for UE4 so I can’t debug this for the community. Only thing I can do is reveal.

How could a UMG widget affect audio engine, it’s weird. And I must have a widget in my game. I will test it.

^^^ Check that video to see the problem. I filmed my game after 5 minutes of playing when the audio starts cutting out. It’s very clear in this video, closing app and re-opening causes it to work for another 5 minutes or so and then the audio begins cutting out again. Changing buffer size, max channels, buffer que, sample rate does not appear to have any effect. The music loops from a loop node in a sound que. I don’t know why that or widgets would be relevant but I am running out of ideas.

Hi @Allenheathx, that is definitely troubling to hear. Do you have any logs from these sessions that you can send? There might be clues there.

Thanks for the response. I am not sure how to obtain the Audio Stat Group logs that Luoyeshu posted a pic of. Do I package the game with “Include Debug Files” ticked in package settings? I will do some research and post soon. To clarify, the audio behavior only occurs on the phone. The pc package has no issues.

If the build was dev or testing, it should generate a log file for the entire game. Among those log lines may be logs concerning audio performance.