Search Unity

sound sfx loop

Discussion in 'Scripting' started by gregmax17, Feb 26, 2011.

  1. gregmax17

    gregmax17

    Joined:
    Jan 23, 2011
    Posts:
    186
    I am trying to make a sound sfx loop. To be exact on what kind of loop, I am wanting to make a car engine loop. My .mp3 is .5 seconds long, and I have a script that will change the pitch depending on how slow/fast the car is moving.

    My problem is with unity's looping. It has a a quarter second pause before it starts the sfx again, it isn't fluid enough. It sounds more annoying than anything. Is there a way to make the sound loop more fluid?

    Thanks
     
  2. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,869
    Are you sure its not an issue with the sound clip itself. Usually, these SFX have some flat levels in the very beginning of them (or at the end). Check out the program Audacity, then zoom into your clip and delete any pieces in the beginning and end.
     
  3. Myx

    Myx

    Joined:
    Nov 29, 2010
    Posts:
    196
    Hello there!

    Pretty much all mp3 encodings result in the addition of some "empty sound", it's just how the format behaves.
    I'd recommend another sound-format for short looping sounds, like .wav.