resonance-audio / resonance-audio-unity-sdk

Resonance Audio SDK for Unity
https://resonance-audio.github.io/resonance-audio/develop/unity/getting-started
Other
297 stars 38 forks source link

Distortion from 3D audio sources in 2019.2 beta #61

Open metaphysician opened 5 years ago

metaphysician commented 5 years ago

hey folks i'm trying this out in the latest 2019.2 beta. nothing all that fancy, just a 3D Audio Source and AudioClip with a Resonance Audio Source on it. i've got one mp3 file plays fine, but the other file is an ambience loop of a waterfall (so, basically full spectrum noise) set to 3D that loops continuously. the file does play but is highly distorted and difficult to tell if spatializing is actually taking place.

has this been tested in Unity 2019.2 beta yet? the last commit was well over a year ago. i'm not feeling confident that Google is going to keep up with updates seeing as how they seem to be leaving the VR market entirely. i can send a test project if needed. thanks! i have tested this all successfully in Unity 2017.4 BTW. will test in 2018.3 and 2019.1 just to be sure.

jkammerl commented 5 years ago

Are you using stereo files for 3d audio sources? For point sources, try to use mono files. Stereo sources must be mixed down to mono which wastes a few CPU cycles and it may lead to distortion if both channels are normalized to 0dB.

metaphysician commented 5 years ago

well, i did convert to mono but it makes no difference at all. the distortion is more like buffer-based distortion than clipping based distortion. so it's not a level issue. also this played fine in Unity 2017.4 as a stereo file so i don't think that's the problem. but i'll keep working on it.

UPDATE - tested this on Unity 2018.3 with much the same results, but i realized it seems only one ResonanceAudio Renderer plugin is supported on the Mixer. having more creates that particular distortion i mentioned. once i created two separate channels feeding into the Master bus with the Renderer on it, it all worked fine and was tested successfully in 2018.3 and 2019.1.8.

however 2019.2 beta still had the same buffer distortion issues, even with the same configuration of two Groups feeding into a Master Bus with the Renderer on it.