Random Loud Glitch when triggering a specific event


We are experiencing a very loud random glitch when a specific 3D event plays in Unity. This seems to occur rarely (around 1 out of 50 times). When this bug occurs, this event (a short creature grunt sound) will trigger a 3/4 seconds noise with a RMS level of around 0dBFS (very loud).

The event has the following specifications:

  • It’s being called directly by the PlayOneShot() method (it is NOT assigned to an FmodStudioEventEmitter)
  • 3D Panner with the default options, except for “Max instances” (they are set to 2) and Min&Max Distance (set to 10.0-40.0)
  • a first audio track that plays a multi-sound module.
  • 1 parameter that will trigger different multi-sound modules on a second audio track, depending on its value.

We are using Fmod Studio v.1.06.02 and Unity v5.3.3f1

Any ideas why this is happening?


Check the Speaker Mode set at runtime matches the speaker mode defined in the tool.

For the tool look at the project preferences menu.

For the 1.06.02 Unity Integration you’ll have to modify FMOD_StudioSystem.cs and add code at line 285

var mySpeakerMode = FMOD.SPEAKERMODE.STEREO; // or 5POINT1 or 7POINT1

Thanks. In my FMOD Project, in the preferences menu, in the “Format” Tab I have it set to “5.1 Surround”. At runtime the speaker mode is stereo.

I’m trying to add that code in FMOD_StudioSystem.cs, however, it gives me an error when compiling. Can you specify exactly where this line needs to be added? From line 280 I have the following:

// Dummy flush and update to get network state
result = system.update();

// Restart without liveupdate if there was a socket error
FMOD.Studio.UnityUtil.LogWarning(“LiveUpdate disabled: socket in already in use”);
ERRCHECK(FMOD.Studio.System.create(out system));
FMOD.System sys;
ERRCHECK(system.getLowLevelSystem(out sys));
result = system.initialize(1024, flags, FMOD.INITFLAGS.NORMAL, global::System.IntPtr.Zero);
isInitialized = true;

Add it right after the line

ERRCHECK(sys.setAdvancedSettings(ref advancedSettings));

Thanks. I still get the following compile error though:

Assets/Plugins/FMOD/FMOD_StudioSystem.cs(259,29): error CS1501: No
overload for method setSoftwareFormat' takes1’ arguments

sorry, my mistake: for you it would be sys.setSoftwareFormat(48000, FMOD.SPEAKERMODE._5POINT1, 0);

Did this fix your compile errors and sound glitches?

Sorry Nicholas, I haven’t tried this yet. I’ll give feedback ASAP :slight_smile: