Search Unity

Audio I am getting this really weird pop/cracking sound when I start playing a sound

Discussion in 'Audio & Video' started by dkstrong, Feb 7, 2019.

  1. dkstrong

    dkstrong

    Joined:
    Aug 17, 2013
    Posts:
    16
    I am trying to add a flying missile sound loop to my missile to play after it launches. It sounds fine after it plays for more than a half second, but for the first half second there is a loud crack sound. Like the 3d audio settings arent being applied instantly. The sound clip is just a constant humming sound.

    (I tried using a couple different engine/missile sounds I found online and still have this problem, so I don't think the issue is the file itself)

    Does anyone know how to set this up so I don't get this cracking sound?

    Audio Source settings:
    Capture.PNG

    Video of the problem I am having here:
     
  2. das_timel

    das_timel

    Joined:
    May 16, 2018
    Posts:
    2
  3. Docaroo

    Docaroo

    Joined:
    Nov 7, 2017
    Posts:
    82
    Could this be to do with your pitch settings for the missile?? Also it could be to do with the fact that you are looping the sound? Maybe the sound doesn't start on a sample value of "0" ... it could be starting at a point where you are mid-samples so you get an impulse when the sound kicks in...
     
  4. hcdjp

    hcdjp

    Joined:
    Oct 7, 2015
    Posts:
    224
    Try adding a tiny fade-in to the sound. Something really small like 1 ms.
     
  5. keithAtPlay

    keithAtPlay

    Joined:
    Feb 5, 2015
    Posts:
    4
    I know this is old, but had the same problem and muddled my way thru it on my own. Here's what worked for me.

    I was trying to use AudioSource and PlayOneShot to handle a coin drop sound effect which fired every frame. I tried modding the frameCount, fiddling with the AudioSource properties, etc. The only thing that worked for me was to assign an Audio Mixer Group for just my Coin Drop, add a Normalize effect and set the max amp to < 1x (0.5x for me). This will also allow you to edit the fade in too as others have suggested without changing the sound file itself (since I was using it elsewhere and it played/sounded perfect when only played once).

    Hope this helps someone!