steam-audio icon indicating copy to clipboard operation
steam-audio copied to clipboard

[Unity] Audio makes a random loud pop and stops playing until restart

Open Frooxius opened this issue 7 years ago • 4 comments

Hello,

I have recently switched my project from using the Oculus Spatializer to the Steam Audio. It works great for the most part, but I've encountered a severe issue.

Sometimes there's a random loud pop and all audio completely stops until the game is restarted. It seems to occur when there's several new audio sources spawned at once, but it's not reliable.

Sometimes spawning just a few triggers the pop, sometimes I can spawn dozens at once and it still works fine. I cannot unfortunately find any pattern in this. Is there anything that would help diagnose this issue?

There is however another thing I have noticed. With many (dozens) of active audio sources, adding new ones causes severe performance hitches. For attaching a single additional audio source takes 5 ms just to attach the Unity AudioSource and setting the "spatializePostEffects" property on it takes 30-40 ms. With OculusSpatializer this doesn't occur and adding a new one is fast.

Frooxius avatar Sep 05 '19 13:09 Frooxius

Is there a scene or project you can share with us so we can reproduce the issue? Also, what version of Unity and Steam Audio are you using?

achandak avatar Oct 02 '19 22:10 achandak

Sorry, I haven't managed to find a way to reproduce this, it seems to happen randomly over the course of running my app. It seems it's more likely to occur when there's multiple sound effects created at the same time, but only sometimes.

I was using Unity 2019.2.x (happened on multiple subversions) and the latest 2.0-beta.17. I have also tried 2.0-beta.16 which had the same issue.

I believe that this issue is likely the same as the one reported here with the DSP usage spike, since in my case it would occur when instantiating many sound effects at the same time: https://github.com/ValveSoftware/steam-audio/issues/104

Frooxius avatar Oct 05 '19 19:10 Frooxius

The latest release, Steam Audio 2.0-beta.18, contains a fix for this issue. Feel free to reopen if the issue persists on your end.

lakulish avatar Apr 22 '20 01:04 lakulish

This issue remain with Steam Audio 2.0-beta20.

yuma1217 avatar Apr 23 '21 05:04 yuma1217