cancel
Showing results for 
Search instead for 
Did you mean: 

Unity Issue on Startup 5.3.2p4

CodingJar
Protege
Hello,

I've noticed that if I build a non-release build, the audio is super crackly when loading my Unity VR game. It's immediately noticeable on the title screen which has only ambient music playing (not spatialized). I looked at the log and found this:

02-26 16:38:49.901: E/Unity(30459): Unable to find libAudioPluginOculusSpatializer
02-26 16:38:49.911: E/Unity(30459): Could not load symbol ovrp_GetEyeOcclusionMesh : undefined symbol: ovrp_GetEyeOcclusionMesh
02-26 16:38:49.911: E/Unity(30459):
02-26 16:38:49.911: E/Unity(30459): (Filename: ./Runtime/Modules/LoadDylib.cpp Line: 207)
02-26 16:38:49.911: E/Unity(30459): Could not load symbol ovrp_GetAudioOutId : undefined symbol: ovrp_GetAudioOutId
02-26 16:38:49.911: E/Unity(30459):
02-26 16:38:49.911: E/Unity(30459): (Filename: ./Runtime/Modules/LoadDylib.cpp Line: 207)
02-26 16:38:49.911: E/Unity(30459): Could not load symbol ovrp_GetAudioInId : undefined symbol: ovrp_GetAudioInId
02-26 16:38:49.911: E/Unity(30459):
02-26 16:38:49.911: E/Unity(30459): (Filename: ./Runtime/Modules/LoadDylib.cpp Line: 207)

This leads me to believe something is wrong in the plug-in. Confusing still, it appears that the audio is still spatialized despite these errors. I can sometimes get the build to work by changing "Best Latency" in the Unity Audio settings to "Default".

Note I'm writing this as I'm testing, so I've just tested this again: Switched to "Best Latency", did a Development build, and it worked for two restarts. Then I switched the Gear VR Service to be in Development Mode and the crackling re-appeared on start-up. There are NO code changes, simply toggling that switch made it appear. Now it appears I can get it to fail about 50% on start-up with re-launches.

The reason I want to test this in Development mode is that I've noticed when we have too many sounds playing in the Release build that our audio crackles and frame rate drops. For this reason, I've created a dynamic spatialization manager that prioritizes certain sounds to be spatialized (and can therefore toggle it at runtime). However, I'm noticing now that the framerate doesn't drop significantly when using the debug build and I am able to spatialize 10+ sounds with no issues. However, I'm getting these weird errors and now I'm worried testing this in Development mode is unreliable.

Any pointers? Has anyone else seen this issue? Keep in mind NO sounds are spatialized when I see it exhibit this error.
Developer of Elementalist X: Immersive and intense tower defense for Gear VR.
15 REPLIES 15

Keksmania
Explorer
I came here for a similar issue. In the editor everything works fine, but when I make a test build on startup the game crashes 50% of the time and for the rest of the time it crackles.. I found a workaround by not using the Oculus spatializer effects on the audio mixer or by changing the output audio mixer 0.5 sec after the game starts .. but obviously that's not how it should be

CodingJar
Protege
I've been developing with "Default" instead of "Best Latency". Not sure I can release with "Best Latency"... doesn't appear it's possible.
Developer of Elementalist X: Immersive and intense tower defense for Gear VR.

petergiokaris
Protege
Hello,

We have also experienced cracking with both Spatialization on or off using Best Latency. On PC this represents a buffer size of 256 samples. I would recommend using Good Latency (which should be 512 samples) and that should resolve crackling.

The crashing issue is something that we will need to investigate further. Are you seeing this crash occur with the test scene that is included with the integraton (RedBallGreenBall)?
Peter Giokaris Senior Software Engineer

CodingJar
Protege
Thank you for the reply. Does the fix in Unity 5.3.3p2 have anything to do with this? From the release notes:

Android: Audio - Don't select OpenSL output if the native device params are too bad for fast path (fixes audio issues on buggy devices).
Developer of Elementalist X: Immersive and intense tower defense for Gear VR.

petergiokaris
Protege
It may very well be. Are you selecting OpenSL and seeing these problems occur? I would recommend not using OpenSL at this time if the application is more stable.
Peter Giokaris Senior Software Engineer

CodingJar
Protege
I've not selected OpenSL, I didn't know that was an option, thought it might do this under the hood. I can't find this option in the Editor settings.
Developer of Elementalist X: Immersive and intense tower defense for Gear VR.

petergiokaris
Protege
I've never seen this either, although being that it's within the docs there should be a way to select. The info given about not selecting OpenSL from below does not give any indication on what devices are buggy, so I don't think we can rely on the info to help with this issue.

Have you tried updating to the latest Unity public release (5.3.3f1)? This is the version I am currently using. I recommend updating to this release.
Peter Giokaris Senior Software Engineer

VRTWRLD
Honored Guest
Hi, I am too suddenly getting a list of errors in Unity 5.3.3p2 after checking the "Virtual Reality Supported" checkbox.
Building for GearVR

Could not load symbol ovrp_GetEyeOcclusionMesh : dlsym(0x10ab8f940, ovrp_GetEyeOcclusionMesh): symbol not found
Could not load symbol ovrp_GetAudioOutId : dlsym(0x10ab8f940, ovrp_GetAudioOutId): symbol not found
Could not load symbol ovrp_GetAudioInId : dlsym(0x10ab8f940, ovrp_GetAudioInId): symbol not found

Compositor failed to initialize.
Bad config or LibOVR not found. VR disabled.
Oculus HMD not present. VRSettings.enabled set to false.

This is new. Did not get any of these warnings in previous versions.

Any ideas on what could be causing this?

vrdaveb
Oculus Staff
The ovrp_* messages should be warnings. Right? Have you installed the Oculus runtime from https://developer.oculus.com/downloads/ ? Unity spins up the Rift rendering stack while building for Gear VR. It's an issue we are fixing for a near-future release. However, it's always done this. Not sure why it just started failing now. Can you send Editor.log?