Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
skyniteVRinside's avatar
10 years ago

Best way to use 3D audio while maximizing performance?

Hi, I was wondering what the most efficient method is for using the Oculus Audio SDK to create sound in Unity. Currently I have disabled 3Daudio prefabs placed in the scene, and activate them when I need them to play (disabling them after a certain amount of time). I've noticed that this is causing drops as high as 4 FPS.

Another solution I've thought of is to spawn the prefabs at a location via Instantiate, but I figure that will be even more performance intensive. Yet another possible solution is keeping the 3Daudio prefabs enabled, but calling the audio.Play() function when they are needed. However, wouldn't having the audio objects just sitting in the scene also cause performance overhead?

What are your guys' solutions for using 3D audio without FPS drop?

1 Reply

Replies have been turned off for this discussion
  • The most efficient solution is to use Unity 5 with the Oculus Native Spatializer Plugin (ONSP) as described here: https://developer.oculus.com/documentat ... -overview/. You can download it here: https://developer.oculus.com/downloads/ ... K_Plugins/. It works with Unity's built-in sound pipeline without any P/Invoke marshaling and should perform well with up to 16 sounds playing at once. Can you try that and let me know if the performance improves?