Audio Distortion problems - Can't track down why — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Audio Distortion problems - Can't track down why

I am having audio distortion problems in End Space - at least according to reviews and I am having difficulty tracking down why.

As far as I know I setup every correctly in Unity, using the right Unity version and the DSP buffer size set to Good. I have a S6 for testing and haven't had a problem with audio before, some reviews say it happens on a S7. The latest version of the game was built using Unity 5.4.1.p1 and uses the Oculus Audio plugin v1.0.4.

I tried updating to the new 1.1.1 audio plugin and have been testing the game with both  Rift and a Gear VR builds and I can get some distortion problems in testing but I am having trouble in detecting why the distortion happens. I think it might be when there are too many audio sources?

Has anyone had problems with audio distortion and found some steps to track it down?

Comments

  • 8bit8bit Posts: 94 Oculus Start Member
    Hey I'm having same issue! I've heavily tested S6 AND Note 4 and had no audio problems. I went and got an S7 because I was told there is "audio judder". The amount of distortion was shocking to me because even my Note 4 holds up fine, seems to only be S7 that has this problem from what I can see. This is the USA S7 (Snapdragon). If anyone has clues it would appreciated! If I find anything I'll be sure to follow up here too.

    I'm using Unity 5.4.1p1
  • justin.wasilenkojustin.wasilenko Posts: 33
    Brain Burst
    Here's a recent thread on reddit about a user experiencing this issue as well: https://www.reddit.com/r/GearVR/comments/5b3s2b/crackling_audio/

    The bottom of the thread talks about switching airplane mode on and off has something to do with it...
  • delphinius81delphinius81 Posts: 297
    Nexus 6
    We had a report with Fearless about something similar on a S7. The user reported judder/echo. I do not remember the exact unity build of the app version that user was on, other than it was in the 5.4.1px range. We are using the default audio settings in our project (not using the oculus spatial audio at all, just built-in unity).
  • PetrozaPetroza Posts: 147 Oculus Staff
    We did have some reports that Unity crackles when running in low latency mode. It might be worth changing the audio latency in the project settings and see if that helps.
  • 8bit8bit Posts: 94 Oculus Start Member
    @PeterStirling, yep that did it. I changed DSP Buffer Size from "Default" to "Best Performance" and the judder/echo went away. I'm assuming the buffer is huge now and latency not the best but clean audio is definitely preferable over crackling/stuttering audio. Thanks. I'm pasting a screenshot of my audio settings for others to reference and for y'all to poke at me in case something else is not set optimally. 
  • justin.wasilenkojustin.wasilenko Posts: 33
    Brain Burst
    @8bit You don't have your Spatizalizer plugin set in the screenshot which means you also aren't using Spatialized audio.

    Also according to the Oculus Utilities downloads page:
    • "Unity 5.3.4-5.3.6p3 and Unity 5.4.0b16-Unity 5.4.0p3: Do not set DSP Buffer Size to Best in Audio Manager in the Inspector for now or you will encounter audio distortion. Set it to Good or Default instead."

    @PeterStirling We have tried that. The current version of End Space on the store is using the 'Default' latency option. As recommended in the documentation.
  • PetrozaPetroza Posts: 147 Oculus Staff
    If you're getting crackling and it's not related to buffer size, could it be a performance issue? What are you seeing in the Unity Profiler?
  • justin.wasilenkojustin.wasilenko Posts: 33
    Brain Burst
    I have had it happen in the Unity editor using my Rift as well. Then it has only been once or twice. But again not sure why as when it happened I wasn't looking for it so I couldn't track it down.

    I don't think it's a performance issue as it's never happened on the S6. I think it's a S7 Edge issue. Going be the reviews it's not related to my game but a lot of other games on the store all with the S7.


  • 8bit8bit Posts: 94 Oculus Start Member
    Hey @justin.wasilenko . So I think the suggestion to not use "best" was referring to "best latency". The opposite side of the spectrum is "best performance". This really did fix most of my audio chop problems on S7, you guys should just test it out, I'd be curious to hear if it helps. Also thanks for prodding me to turn on Oculus Spatializer. I was hesitant to enable because 3D positioned sound doesn't add much to my game and I thought I would save some cycles by leaving it off but I think performance has actually improved after turning it on. Cheers.
  • justin.wasilenkojustin.wasilenko Posts: 33
    Brain Burst
    Ok yeah I will give that a go as well. I really think this issue is deeper than that. I was just looking at reviews of other games on the store and it seems a lot of people with the S7 Edge are suffering audio problems. Recent reviews of Gunjack prove it's not a Unity issue but is also happening on Unreal Engine.
  • justin.wasilenkojustin.wasilenko Posts: 33
    Brain Burst
    @petergiokaris , @PeterStirling

    Can you guys confirm something for me?

    Is it true for audio spatialization to work correctly the sound clips need to be set to mono and not stereo?

    And when adding the effect to the mixer there are 2 options. OculusSpatializer and OculusSpatializerReflection. On the shipped version of End Space with the audio problems, I had added the 'OculusSpatializerReflection' effect to the mixer with Reflection Engine turned off and Late Reverberation turned off. If I am not using those features should I use the OculusSpatializer effect instead?

    Do those effects have to be on the Master Group? Or can they be on another group? Right now I have different groups setup, one group with spatialized sounds and OculusSpatializerReflection effect added. The other groups do not have spatialized sounds routed to them and don't have the effect added either.
  • petergiokarispetergiokaris Posts: 170 Oculus Staff
    Hi Justin,

    Sounds should be mono. A multi-channel audio file will spatialize, but we only select the first channel to spatialize (which is the left). That means you would have strange stereo artifacts show up in the spatialization due to the right (and higher) channel missing.

    You only want to add the OculusSpatializerReflection process to the mixer channel. We create two plug-ins, one for the AudioSource, OculusSpatializer (which is like an 'insert' effect) and OculusSpatializerReflection (which is like a 'send' effect). Unfortunately, the Unity native system for mixer plug-ins cannot differentiate the OculusSpatialzer plug-in from the mixer itself (this is something we will bring to Unity's attention). If you are only using the direct portion of our engine (which doesn't add early reflections and reverb into the sound) you can safely avoid adding the OculusSpatializerReflection plug-in on your mixer.

    OculusSpatializerReflection does not have to be on the Master Group. You can set it to any group you prefer. However, it's recommended that you assign your spatialized sounds to that group to keep the mix integrity between the direct portion of the sound and the reflection/reverb portion. Also, you can only assign OculusSpatializerPlugin only once in your mixer. Adding two plug-ins will cause the reflection engine to possibly glitch since there is only a single refection engine shared by all spatialized sounds.

    Hope this info helps!

    Peter
    Peter Giokaris
    Senior Software Engineer
  • justin.wasilenkojustin.wasilenko Posts: 33
    Brain Burst
    Ok thanks @petergiokaris. Then I had it setup correctly in the first place. Thanks for confirming that.

    I just reimported the 1.1.1 audio plugin and ran the test scene on my mixer after deleting the OculusSpatializerReflection from my groups and it does indeed work.

    My game (End Space) is set in space and I don't need to use the reflection options since there is no reflection in space ;)
Sign In or Register to comment.