private void waitForBuffering() throws InterruptedException {
		String msg;
		float kbps;
		long t, t1 = System.currentTimeMillis();
		while (bufsize < BUFFERSIZE && !eof) {
			lock.wait();
			if((t = System.currentTimeMillis() - t1) < 200)
				continue;
			kbps = (float) (BUFLEN >> 10) * 1000 / t;
			msg = String.format("\rbuffered: %6.2f%%, %6.02fKB/s ",
					100f * bufsize / BUFLEN, kbps);
			if(audio != null)
				audio.refreshMessage(msg);
			else
				System.out.print(msg);
			if (t > 10000 && kbps < 8) {
				System.out.println("\nDownloading speed too slow,please try again later.");
				close();
				break;
			}
		}
		System.out.print("\n");
	}