You might’ve come across a very annoying clicking sound which is played when attempting to play audio repeatedly:
When doing this, it will interrupt the currently playing waveform and skip back the the beginning of the audio, this causes the click to occur.
EDIT I quote @vsnry for his great technical analysis of what is happening here:
The click happens because the sound changes frequencies instantly. MP3 prevents this by creating short fades at the beginning and end of an audio track, but it messes up if you want to loop something. As someone else already suggested if you want to make a perfect loop, use the .ogg file type.
In order to fix this problem, you would want to clone the sound and then play it upon removal.
This essentially creates multiple instances of sound files playing at once, instead of having it interrupted by the Play() Command, and then essentially removed, so you don’t have to worry about the debris of clones left over.
This can be used in UI interfaces, to improve the sound quality should you want to make a sound play on MouseLeave or on MouseEnter
This can be used alongside with effects where text is typed onto a value by a script (Typewriter effect).
- Easy to follow
You’ve mastered this.