cancel
Showing results for 
Search instead for 
Did you mean: 

FMOD Events using Oculus Spatializer plugin stop playing.

Jaytheway
Honored Guest
Hi,
Unity 5.4.2f2,  fmod 1.0.8.15, Audio SDK 1.1.2

After awhile FMOD events that are using Oculus Spatialization plugin, stop playing. FMOD profiler registring correct number of event being played, but the audio levels are absent (-80).

After deleting Oculus Spatialization plugin from the FMOD event, event plays and sounds properly.

All FMOD events with Oculus Spatialization pluging have this issue.

Issue occurs after a lot of instances of Events happened. Some sounds start to fall off, and after some time all Events using Oculus Spatialization plugin does not sound.

Does anybody know why is this happening?


pymv2qygf2o5.png
7 REPLIES 7

owenwp
Expert Protege
The Oculus spatializer can only play a limited number of events at once, and that number is very low if you have early reflections turned on.  In past versions it was only 8 iirc.

Jaytheway
Honored Guest
owenwp, I read somewhere on developer3.oculus.com that the number is limited to 64 per channel (or something like that), and it is for mobile platform. In our game total number of audio events playing at the same time, using Oculus Spatializer and without it, is less then 60. 

Also this bug occurs with Reflections turned off.

To get some context, we are developing a mobile VR game, which involves zombies. Oculus Spatialization plugin placed on footsteps and all other noises they're making.

It almost seems like Oculus Spatializer does not clear its number of event being played.

Petroza
Heroic Explorer
I have reproduced the issue, it looks like spatializer instances aren't being cleaned up when they finish playing. I will follow up with FMOD directly to work out what is causing this issue, and in the mean time I will look for a work around.

Just for clarity on the other points: there is a fixed limit of sounds - we actually increased it even further so you can have 128 sounds (with or without reflections) playing simultaneously. 

Jaytheway
Honored Guest
Peter Stirling, thank you very much for looking into out problem. This is great that the limit is even higher than I thought.

Petroza
Heroic Explorer
I have a work-around for this issue where it only grabs one of the spatializers from the internal pool of 128 when there is audio playing and returns it when the input signal ends - this appears to be solid and will be in our next release.

One thing to note about the next release is it will depend on the 1.08.16 version of FMOD (currently unreleased) to fix another issue with positioning (unstable listener position could cause "fluttering" effect in the audio). This new version will be incompatible with older releases. If possible I highly recommend updating to 1.08.16 when it is available. If that is not an option for you we can look into cherry picking this fix into the older version, but it would be better to upgrade to get the positioning fix as well..


Petroza
Heroic Explorer
One further update to this: the FMOD EventInstance will hold onto the spatializer as long as it's lifetime (from createInstance until EventInstance::release() is called). This should normally be fine if you are properly cleaning up instances when they complete, however we did uncover one bug on the FMOD Unity integration where PlayOneShot would leak instances (which is how I reproduced the issue). If you are using the FMOD API directly the issue here most likely is caused by failing to call EventInstance::release, properly releasing instances should resolve the problem.

We will still keep the new workaround I implemented because it will mean that inactive instances will return their internal spatializer to the pool as soon as it stop processing for more efficient resource usage.

Jaytheway
Honored Guest
We tried manually deleting FMOD Event Instances, it didn't solve the issue. Probably because of instances leakage you've mentioned. Though, I'm not sure how it was done, since it was not me who wrote the code. Looking forward to a new updates.