Audio Repeating

So I’m making a basic pacman game for my project in university and I’m having trouble with the audio sounds when pacman is eating the pacdots.

I have 2 questions which are:

  1. What should I attach the sound source to? I have tried adding the sounds to pacman when he eats a pacdot but I’m not sure if that’s the correct way to go.

  2. Because you’re eating a pacdot every 0.5s it tries to play the audio sound again straight away without the previous one playing (you would eat about 5-10 pacdots until the first sound would finish playing).
    So it just sounds like a machine gun as the audio just keeps repeating without any real sound coming out. Is there a way to play the next audio WHEN the previous one has ended?

if (!audio.isPlaying){
audio.play();
}
see doc for more info AudioSource.isPlaying