0
0

When I have over 60 or so sounds in my game, even if they are STOPPED, any additional sounds that are added will not play. I tried to increase maxchannels with:

FMODUnity.RuntimeManager.LowlevelSystem.init(1000, FMOD.INITFLAGS.VOL0_BECOMES_VIRTUAL, System.IntPtr.Zero);

But that didn’t seem to change anything. Anything else I can try?

EDIT:
I also tried and failed:

    FMODUnity.RuntimeManager.LowlevelSystem.setSoftwareChannels(256);
    FMOD.ADVANCEDSETTINGS settings = new FMOD.ADVANCEDSETTINGS();
    settings.maxVorbisCodecs = 128;
    FMODUnity.RuntimeManager.LowlevelSystem.setAdvancedSettings(ref settings);

EDIT 2:
To recreate, all I have to do is this inside an ienumerator:

   var sound = FMODUnity.RuntimeManager.CreateInstance(path);
   for (int = 0; i < 100; i++) {
           sound.start();
           sound.release();
           yield return new WaitForSeconds(0.05f);
    }

After that new sounds will not play anymore.

  • You must to post comments
0
0

You need to make sure fmod’s update function is called to allow it to manage and release channels.

You don’t need to adjust any settings, so I would remove that code you added (ie in FMOD_ADVANCEDSETTINGS) unless you want higher CPU usage.

A tight loop like you’ve done doesn’t allow the update to run, so is an artificial test.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.