ValveSoftware / steam-audio

Steam Audio
https://valvesoftware.github.io/steam-audio/
Apache License 2.0
2.27k stars 158 forks source link

[Unity] High DSP load. DSP Load overshoots 100%. #273

Closed AlexanderPismennyi closed 1 year ago

AlexanderPismennyi commented 1 year ago

I have 36 audio sources on the scene. All reflections are baked.

This happens when spatialize turned on (with all steam audio source settings) image

And when I turn off the spatialze the DSP load falls to 1-2%.

achandak commented 1 year ago

Were you able to resolve the other issue you posted with no sound being hear on few sources? Can you share your settings for the source and also the global Steam Audio settings? Specifically, what is the Baking Ambisonics Order settings.

AlexanderPismennyi commented 1 year ago

As long as I remember - yes, I increased "Max real voices" in "Project Settings / Audio". But I'm not sure because 100% DSP was a higher priority issue. All settings are the same as in my previous post.

image image

achandak commented 1 year ago

What version of Steam Audio are you using? Also, CPU specs will be helpful here.

On Steam Audio 4.4 I am hovering around 34% DSP usage for 32 sources using settings similar to yours.

image

If you are able to share a standalone project, I can try to reproduce the perf issues on that project.

AlexanderPismennyi commented 1 year ago

Sorry, but at the moment I have no opportunity to return to the project. Based on your test, if you imagine that there are 200 static sound sources on stage, then even if you bake it all, there will be a high DSP and performance loss, right? I just hoped that baking would give a significant performance boost, because I heard that Steam Audio is very optimized, which works well even on smartphones, although I am making a PC game, this gave me confidence that with a large number of sources and with baked sound it will give a small performance loss, however, in return I get excellent spatial sound. Simple Unity sources with a spatial blend slider in 3D, in the amount of 200 pieces, showed a DSP of about 3%, I think your processor is better than mine, and even with 32 DSP sources, the load is 36%, which means that with 200 sources, in any case, there will be more than a hundred percent. Perhaps I did something wrong or set the wrong settings or baked something wrong. In any case, thanks for the help. After some time, I will probably return to this issue, I will use the new version of Steam Audio and first conduct tests for a specific task. Perhaps you have advice for the future? And finally, one suggestion for improvement, make it possible to bake all the sound sources on the scene with one button. Maybe I didn’t find how to do it, and do it myself with a coroutine, but this is purely a suggestion. Thank you for help!