Search Unity

Audio Sound Spatializer plugins causing weird sound "click"/"glitches" on first Plays

Discussion in 'Audio & Video' started by TheTortilla, Jan 12, 2018.

  1. TheTortilla

    TheTortilla

    Joined:
    Nov 25, 2013
    Posts:
    38
    Hello everyone,

    here is my issue:

    When I play a sound that is spatialized and a spatializer plugin is enabled (MS HRTF, Oculus, or Steam Audio SDK) the sound makes a "click", what I mean is that the sound is played at very high volume for a short period of time. It occurs only the first time the audiosource is played, and that happens for each audiosource.

    Did you ever experienced this issue? How can I solve it?

    Thank you for your help!

    Edit: apparently this only happens if there is a rigidbody is in the same GameObject as the audiosource or in one of its parents
     
    Last edited: Jan 12, 2018
  2. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    434
    Hey! I'm having the same issue. It's not a click for me, it's the first bit of the sound (maybe the first sample?) I can notice it because it's happening on objects outside of the hearing distance (sounds that should be culled by the system are not being culled). For now, I've just manually put culling in my AudioManager class.

    Another crazy bug which I have yet to file a report on (took me AGES to find): If you unspatialize a sound that's being spatialized, it will cause a memory leak. Do that enough times and your game and editor become unusable.
     
  3. TheTortilla

    TheTortilla

    Joined:
    Nov 25, 2013
    Posts:
    38
    So I'm not the only one ^^. I didn't find anything anywhere, I think the only solution is to do audiosource pooling and reuse the same audiosources that you'll never disable...
     
  4. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    This is still an issue in Unity 2017.4.24f.

    What I've done is disable spatialize on the audioSource and added the ONSP audio source (Oculus) component to those with the issue and it went away. This obviously wont work for everyone (since my title is VR). but that least someone may be able to get a quick solution.
     
  5. Pivetta

    Pivetta

    Joined:
    Oct 11, 2013
    Posts:
    19
    Sorry for joining late the party but I'm fighting the same problem, the Oculus for Unity documentation says ONSP is not to use on Android - my case, and I just notice the sounds with ONSP sound weird out of place (somehow too near)

    Are new workarounds around there?
     
  6. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    I have this problem too. First one or two sounds are unrecognizable. Once I deleted RigidBody it worked fine.
    Using Oculus Spatializer.
    At least I know a bit more about this weird bug, till now I was clueless.