Audio stops playing randomly
So I'm trying to play background music, some SFX and some voice sound for AI. I'm on my custom project and didn't try reproducing the scene on a blank template as I'm half way through my game setup. Reproducing will need a lot of time.
Now, Here are a video links for the problem,
I have 2 sound cues for AI voice sound and bush rattling (sound cues only have few soundwaves and a random node) and 2 soundwaves for music, all of these having default settings except the sound class property is set to relevant class. Here are the settings of the audio files.
NOTE : I use 2 audio component to switch the background sounds and for SFX and Voice sound, I used dedicated audio components for characters and bush actors
If need any more info for debugging lemme know. I'm I missing something or its jus a bug ?
Please help !! its wasting lot of time ... :(
Hey guys, we recently found the bug in one of our internal projects.
It was introduced when we supported pausing individual sounds in addition to pausing the entire game. The cause of the bug is because sound sources objects are recycled and state needs to be cleared before reuse. Sound sources from a previous life which were paused are causing future sound sources to behave as if they're paused.
The fix is simple, I'm trying to see if I can get approval for a hotfix, but in the meantime, if you need a quick patch, add the following code in AudioDevice.cpp (line 2911) after successfully initializing a sound source.
In 4.15 we have a CommonInit function for sound sources which is called inside Init on all platforms so this will look a little different in 4.15+.
answered Dec 12 '16 at 07:16 PM
I recently entered and verified a bug that seems very related to this issue. You will need to wait until the hotfix is released, but you can view the ticket entered by following the link below.
Let me know if you have further questions.
answered Dec 19 '16 at 02:53 PM
This happens to us as well after updating to 4.14. https://answers.unrealengine.com/questions/530859/updating-to-414-completely-screws-the-audio.html
One thing we noticed is that the sounds that were stopped after loading a map will start play after we resume the game. We use UGameplayStatics::SetGamePaused to pause/resume the game.
From what we know there is no special case where the sounds get heard, the same sound (we are shooting weapons in an FPS game and one weapon uses the same shooting sound) sometimes plays, sometimes it doesn't. However, it happens to us with a lot of other sounds, no necessarily sounds you shoot fast or with a certain setup.
Let us know if you find out anything else.
Follow this question
Once you sign in you will be able to subscribe for any updates here