So I transferred over my project from 4.10.4 to 4.11. Once in 4.11, some of my sound cues are acting strange while testing. They won’t play at all in the content browser, and some won’t play in game.
But inside my content browser if I click play on any cue, none of them produce sound. Opening any Cue and hit the “play Cue” button does nothing at all, doesn’t even fire (orange simulation lines). Even though my sound files play fine on their own in the content browser.
Now I have an attenuation node inside my cues, if I uncheck the box “override attenuation” and hit play cue, it fires and it plays just fine after that. I check the box again to override the attenuation and the cue still plays fine from their on until I close the engine.
Even more, within running my game in-engine, some of the cues fail to play, even if tinkered and I get them to play in game; everything I did above would revert back once I close the engine and open it again for the next session. All Cues won’t play when in content browser again, and the same few sound cues won’t play in game correctly, even though they are being called in the Blueprints accurately. (I quadrupled checked)
Everything about this looks like a bug. All of my Cues were working excellent in 4.10.4. Please HAAALP!!
I sort of fixed it… I created a new blank project.
Then opened the original project. Right click on the content folder, select migrate, and then migrate everything to the content folder of your new project.
Sound cues now work… But… a whole bunch of other stuff is broken… Like my character character movement, menus, etc, is not working. But perhaps it wont’t be too much trouble once I open up the blueprints and look.
I was able to reproduce the issue in a blank project. First I opened 4.10.4 and made a project. Added a sound wave file, right clicked on it and made a cue for it. Within the cue I just added an attenuation node. On the node I have override attenuation set and the Radius to 50, fallout to 100 (reflecting my projects settings).
I saved the project, closed unreal. Opened unreal 4.11 and opened the 4.10.4 project. I chose to convert in place. Once the project opens up in 4.11, If I got to the sound cue and hit play it won’t play. I would have to go to the attenuation node, check off override attenuation. Hit play, it now plays. And check override attenuation on again. Issue comes back in when I close and open the engine.
PS. I also noticed that in 4.11 converted project, under concurrency in the sound cue is already checked to on, which is not the default. Not sure if that helps, but there it is.
Also noticed that the issue persists even if I import a sound wave and create a cue for it in within the 4.11 project. Initially it will seem like it works, but if you restart the engine, the cue will no longer play.
Is the issue only happening with sound-cues played with a sound attenuation settings object or does it also happen with regular sound-waves? Can you give us screenshots of the sound attenuation before upgrading and the sound attenuation after upgrading?
The sound attenuation object changed quite a bit in 4.11 and it sounds like the backwards compat code is not quite right. The biggest things we did to adopt to new features was translating from old filtering settings (which were broken) to new filtering settings (which are working) and adopted old concurrency behavior to the new sound-concurrency system.
I suspect whats causing the issue in this case is that the sound-concurrency update code is not quite right. It’s supposed to copy the exact old settings to the new settings as a local “override” (i.e. not using a sound concurrency object ref), which will have the same behavior as before. The new sound concurrency feature takes the old concurrency feature that limited sound-concurrency to instances of the same sound-cue (or sound-wave) to a group where any number of sound-waves/sound-cues can share in concurrency limits.
It seems to fire and play fine in the sound cue window, if I get rid of the sound attenuation node all together. So it seems the issue is within the attenuation node as you suspected. Keeping in mind this happens even if I rebuild the sound cue in 4.11 from an imported sound wave.
I went ahead and entered a bug for this issue (UE-29091) and am working alongside MinusKelvin to get this issue resolved.
We appreciate you taking the time to report this bug, and once a fix has been implemented it will be added to the list of fixed issues for an upcoming hotfix or full engine release.
Hello Again. Sorry to be such a nuisance, but I’ve made an interesting discovery that may or may not assist you.
I’ve noticed that if I have any blueprint windows open while play testing my game in engine, some of the sound cues won’t fire or play. If I close all blueprint windows before testing, the sound cues work like a charm once more.
So for the preview issue, it is due to the added distance check in the UAudioComponent::PlayInternal, you can work around that by adding a bIsUISound check in that function before pruning distance.
Working on a solution for the in-game issue. We found that it’s due to the fact the ambient actors are playing one-shot sounds. We’ll probably end up cutting the distance check there altogether.
I figured out the source of the issue, at least with the project I was given to me by which appeared to reproduce the problem. The issue is that I added a distance check to UAudioComponent::PlayInternal which was intending to reduce the number of audio components created, which worked for us on Paragon. However, I hadn’t taken into considering the case of a one-shot sound played on an ambient actor (and likely other cases as well). Removing the distance check appears to fix all these issues (the sound cue not playing in content browser preview, and one-shot sounds not playing from ambient actors, etc).
If you have the 4.11 code from github (and can program a bit to hack something in) and want to patch in the fix to test it out to help me confirm it fixes the problems for you guys specifically, before the 4.11.2 hotfix is out, it’s basically to remove the branch which checks if a sound is audible:
In UAudioComponent::PlayInternal, remove this line:
And remove the code at the bottom which calls PlaybackComplete(true):
// Failed to actually try and play the sound so notify that the sound is complete.
// This will destroy the audio component if this is the last active sound on the audio component
if (!bPlayedSound)
{
PlaybackCompleted(true);
}
So what was happening (again, at least in the repro found for me) is the auto-trigger was happening for ambient actors that have a one-shot sound to play (i.e. non-looping). Since the actors were all out of range, the audio component was being immediately destroyed. Then when walking within range of the sound, since the audio component was destroyed (and no active sound was created) the sound would never play. In the preview case, it was doing a distance check with the preview and not playing there as well.
I thought best to add my two cents here before making a new post, however this issue also affects Spawn Sound 2D’s once you play it it never moves from that space and you actually walk away from it even though its 2D.
I hope this helps sort the Hotfix out, its really hard to test anything related to Audio with it.
Just to bump this, after upgrading to 4.11.2, the problem still persists here … Or at least, the sound cue visually in editor appears to be playing, but no sound when playing cue or even the wav nodes.