So I’ve got one engine event, attached to all the traffic prefabs in unity.
I’ve set the instances to 2, and tried both stealing oldest, furthest, quietest, but i can only hear the engine sounds from 2 of the cars. The stealing isn’t working as you get closer to/further from other cars.
There are only two ways I can get audio from all the traffic.
Setting stealing to virtualize, and
setting the instances to infinite.
But both these ways create wasapi starvation.
If I set the stealing to oldest/quietest,furthest, the wasapi starvation stops, but again, I only hear audio from max 2 of the traffic cars, and the rest produce no audio at all.
The event has all the engine audio on the RPM parameter sheet.
Leave the option as disabled, I was just checking what you had it as. Would it be possible to run a profiler session (FMOD Studio | Profiling), focusing on what the voices are doing e.g. how many are real and how many are virtual? This might help us get close to the issue.
I wanted to let you know, after doing some reading in the fmod optimization documentation, I did a bit of compressing/encoding of a lot of audio with ogg vorbis, and am no longer getting wasapi starvation errors in unity. I was bouncing all my audio at 48k, which I think was causing the problem.
But I was wondering if you could still please take a look at my profiler and let me know if you see anything that I should be concerned about?
My apologies, I should have linked the documentation for packaging a Profiler session here FMOD Studio | Profiling.
This could be solved by enabling the Load Bank Sample Data option in the settings (Unity Integration | Settings), “This will reduce latency whenever an event is played for the first time, at the cost of using more memory.”
It will entirely depend on your situation. You can read about the Virtualization System under FMOD API | White Papers - Virtual Voices. But in summary, the system can handle hundreds or even thousands of voices at once. So sitting at 512 is fine, where it would be a concern is if they are all being created at the same time.
Thanks Conner, how do I avoid them all being created at the same time? For example, lets say theres 20 traffic cars, all with one event being virtualized. You load into the map, and they all load, im assuming… Is there a way to get only the closest to load first or something?