Need help with increasing software channel limit

Hello everyone!

I’m diving into this for the first time and am having a hard time so would really like some explanations and help.

  1. So, first of all, I have some annoying voice limit problems (which somehow do not happen in Unity, but only in builds), so would like to increase the limit. After searching documentation and forums I feel a bit overwhelmed, so my question is would this code be enough for that:

FMOD.Studio.System.create(out var sys);
sys.getCoreSystem(out var coreSystem);
coreSystem.setSoftwareChannels(256);

  1. Where should I be looking to confirm the change of the software channel limit? Somewhere in Profiler, I suppose?

  2. What is the difference between setting this in code and via menu FMOD - Edit Settings - Platform Specific - Virtual Channel Count?

Am very grateful beforehand.
Thanks!

Yes, but only for events played through your newly created sys system object. Any FMOD Unity components would be playing through the RuntimeManager’s system object so this code would not affect them.

You can call System::getSoftwareChannels to see what the new software limit is. To see it in action you could try playing a large number of sounds and call System::getChannelsPlaying to see if channels is capping out at where you expect it to. Otherwise the profiler is a good option.

Adjusting the FMOD Unity Settings will change the value passed into the RuntimeManger’s system object at initialization time. Internally that is a call to System::setSoftwareChannels. Calling setSoftwareChannels yourself on the RuntimeManger’s system object will do nothing because setSoftwareChannels can only be called on an uninitialized system object.

1 Like

Jeff, thanks a great lot!
Very much appreciated

Hello again Jeff!
I know I’ve marked the issue solved but it seems I still have serious complications in both understanding the problem and fixing it. I really would like to receive some help because this is something beyond my skill at the moment.

Firstly, I’ve been provided with the video by the players that have audio issues. Please take a look at it:

The problem is mostly audible with the shooting sounds. At first, they are okay but after a series of shootings, they get clipped. There are no max instances limitations and voice stealing parameters for a shooting event In FMOD Studio, so the bug is clearly something related to the voice limit.

So, I joined the project a bit late when its architecture had been already designed and I had to follow it when integrating the audio. That led to audio scripts being scattered all over the place, so the music, zombies, player, voice-overs, and weapon sounds are called from very different spots. All of them are playing through RuntimeManager in the usual ways like CreateInstance, instance.start, instance.release or PlayOneShot.

At the moment I’ve tried different things.

I’ve set the priority for shooting sounds in Studio to the highest. I’ve lowered the priority for other sounds in hope that they should get clipped instead of shootings. In FMOD Unity settings I’ve set the highest possible virtual and real channel count limitations.
Screenshot_1

This can help to some extent, but the problem is always getting back.
So in a desperate call for help, I’d like to know if is there a way to globally set higher values for the RuntimeManager system object than the ones I have in Settings?

I understand I should have probably created a different system object and initialized it with high channel limit values and run all audio through it. But at the moment redoing that for all the audio in the game seems impossible, so if there’s an easier way to fix it, that would save me.

As said, I’m new to Studio API programming, so there’s a chance I miss something very obvious and easily doable. At least, I hope for it :slight_smile:

Jeff or anyone willing to help, I’d be very grateful.

Unfortunately you have already tried the one way to set higher values for the RuntimeManager by changing the Virtual and Real channel counts.

Not neccessarily, I am not hearing an unreasonable amount of sounds here and I don’t expect you are anywhere near the limit. I suggest enabling Live Update in your FMOD Unity Settings and attaching the FMOD Studio Profiler to see what’s going on with the voice stealing behaviour. If you take a profiler capture and upload it to your FMOD Profile I can take a look and help you interpret the data.