Buzzing at start of audio clip (solved)

I’m trying to use the following code to play a sound before going to another scene. The problem is that there’s an odd buzzing sound played at the beginning of the audio clip. This happens no matter which sound I use. Any suggestions or solutions would be much appreciated.

var rayLength = 22;

function Update(){
if (Input.GetMouseButton(0)) {
		
var ray: Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
var hit: RaycastHit;

if (Physics.Raycast(ray, hit, rayLength)) {
audio.Play();
Invoke("NewLevelFunc", audio.clip.length); 
}
}
}

function NewLevelFunc() { 
    Application.LoadLevel ("Green"); 
}

P.S.- Many thanks to those generous people who have posted code to get me even this far.

the buzzing sound is by design. You tell it to play the sound but nowhere do you set a state or check one to ensure that the level switch is not already happening so what you do is actually fire the sound and level load dozens of times until the actual level switch happens.

Ah, thank you, dreamora!

I thought that Invoke("NewLevelFunc", audio.clip.length); prevented the the level from trying to load until after the end of the audio clip.

var rayLength = 200;

function Update(){
if (Input.GetMouseButton(0)) {
var ray: Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
var hit: RaycastHit;
		
if (Physics.Raycast(ray, hit, rayLength)) {
if (!audio.isPlaying) audio.Play(); 
Invoke("NewLevelFunc", audio.clip.length); 
}
}
}

function NewLevelFunc() { 
    Application.LoadLevel ("Green"); 
}

Now it works great!

Argh… I’m having trouble again. I have a scene with four doors (red, blue, yellow, green) and each going to a different scene. Each door is a simple cube mesh with rigidbody and the above script attached. The only thing changed in each script is the name of the destination scene.

My problem is that when I click on any door, they all lead to the “Green” scene. The doors are in different directions, so it does not seem that I could be getting a hit on the wrong door and not the same green door every time it “misfires.” What am I doing wrong, please?