Changing AudioSource.clip causes click/pop sound

Hi All, I’ve had this problem for a while now, and have not had much luck finding a solution.

I have a script attached to a gameObject called BGM.cs. In this script, a coroutine is started that picks a random AudioClip from a List and plays it. After a time delay it then plays another random clip.

Here’s the play code:

// get the track from the playlist
AudioClip clip = tracks[CurretTrack];

// stop the audioplayer first (may cause Pop noise if clip is changed 
// while playing) <-- Did not work

// set the clip and play it
musicSource.clip = clip;

yield return new WaitForSeconds(time);

I am using MP3 music, and I have also noticed this with other audio assets in WAV, only when stopping or changing a clip.

I uploaded an example of the set-up and the bug to YT: Audio pops when switching AudioClip?? - YouTube

If anyone can help me with this, I’d really appreciate it :slight_smile:

this happen when you set a new clip to the audio source and play it many times in a show period of time.
try using :


have same your problem …did you find a solution ?