audio.loop Whats Up With That??

In two years, I don’t think I have made a single complaint about Unity, but the audio looping. WTF world??!!!

I mean come on!!! Every time I attempt to loop an audio file, it does NOT LOOP properly.

Please can some one give me some type of repsonse that will eliviate this nightmarish situation???

You’re doing it wrong

That’s ambiguous

I will explain it in simple steps (Not to be rude, but just to be helpful :slight_smile:

  1. Important audio file
  2. Drag audio to camera It should then create an audio source component
  3. Under the attached Audio Source component, if you want to play as soon as that camera becomes active, select “Play on awake”
  4. Make sure the “Loop” checkbox is selected, this will then automatically replay the audio file when it has reached the end of its course, if you have an audio file that does not loop properly at the end, that is not unity’s fault but the audio file itself is not ‘seamless’ so to speak. Try googling “How to make a good looping audio file”. That will give you some tips on making sure the end and start are the same, so when it starts over, its as if it never stopped.

Also, if the audio is compressed you have another checkbox “Gapless looping” in the AudioClip import settings.

Might also want to check that the Audiosettings and your imported audio are of the same Hz
I don’t know if that has an effect on the internal implementation of looping, but it changes the length of the file because it plays back at a different speed

Thanks all,
the issue may have been above. I was importing loops as mp3’s. This is fine for one shot sounds but bad for loops apparently. As such, when I import the file as an AIF at 44.1K its fine.

Oh thank god.
Cheers!