Audio Playback Delay

I am getting about a .1 second delay from when I start a sound to the time it actually starts playing.

void Update () {
		if (Input.GetKeyDown("j"))
		{
			if (atBeginning)
			{
				startTime = Time.time;
				atBeginning = false;
				atEnd = false;
				door.audio.Play();
			}
			else
			{
				atBeginning = true;
				atEnd = false;
				transform.position = start.transform.position;
			}
			
			//AudioSource.PlayClipAtPoint(clip, transform.position);
		}
		
		if (!atBeginning  !atEnd)
		{
			float p = (Time.time - startTime) / 2.0f;
			if (p<0) p = 0;  if (p > 1) p = 1;
			
			if (p == 1)
			{
				atEnd = true;
				//AudioSource.PlayClipAtPoint(clip3, transform.position);
			}
			transform.position = Vector3.Lerp(start.transform.position, end.transform.position, p);
		}
			
		if (Input.GetKeyDown("space"))
		{
			AudioSource.PlayClipAtPoint(clip2, transform.position);
		}
	}

This is happening if I use ogg or uncompressed wav files. I also have Decompress on Load checked. Anyway, I was just wondering if anyone has had similar problems or knows of a way to reduce the delay.

I experienced something similar when making GUI animations with sound recently… Is this a new problem in 2.6?

Bump.

This is wrong. The latency shouldn’t be more than 10-20ms, tops. Unless the system/cpu is really stressed. Can you create a simple project where this reproduces and report it (Help->Report problem).

(You didn’t post the entire src code, but you’re initializing atBeginning to true, right?)

cheers,