cancel
Showing results for 
Search instead for 
Did you mean: 

Spatialization check

writerofworlds
Honored Guest
Hi,
I'm using Unity 5. The SDK manual says (regarding Pan Level and Spread): "It is important not to modify these values while sound is running through the spatializer, or it will dramatically affect the output of the spatialization."

So is there any way to tell if a sound is one of the 8 (or 32) currently being spatialized? If it's not being spatialized, I want to modify a lowpass filter (and do some other stuff) on that particular AudioSource.

Thanks!
2 REPLIES 2

petergiokaris
Protege
Hello there,

There is currently no way to do this automatically. You would need to modify the OSPAudioSource script and detect if it's been given resources for spatialization. Look for sNoContext to see how it's used (you could even make the "context" member public and check against it directly).

After that, you would be responsible for hacking into OnAudioFilterRead (which is used by the spatializer) to add a low-pass filter.

Our next release of the SDK is coming out soon. Unfortunately, it will not have this feature in place, but we will look into supporting this in the following release.

Let me know if you need any more help!

Best,
Peter
Peter Giokaris Senior Software Engineer

writerofworlds
Honored Guest
Ok, thanks. I'll give it a go. Looking forward to the next release!