JDK-6251460 : REGRESSION: BUG:5070730 is NOT fixed - short sounds do not play.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.2,5.0,5.0u5,6
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_98,windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2005-04-06
  • Updated: 2011-01-19
  • Resolved: 2005-08-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u5Fixed 6 b48Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Windows XP, 2000 professional - that I have tested on.

A DESCRIPTION OF THE PROBLEM :
I would like to re-open the bug 5070730. Its not fixed for short AU clips. I have a game website that depends on the using the asynchronous use of the Applet getAudioClip and AudioClip.play. This has worked fine for JVM 1.1 , 1.3 etc. But I have realised that in 1.5.0_02 (and 1.5.0, 1.4.x) it does not work correctly.
This is a regression.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :


Use the applet as described in this case

Please retrieve the nock.au file from:
http://www.play3dpool.com/pool/nock.au


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
when you run the above applet (either in a browser or appletviewer) using say JDK 1.3 or early you will hear a many small "click" sounds very close together.
However if you use JDK1.5 to run the same applet you will hear only 1 click, or nothing, or sometimes a couple.


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------

import java.applet.*;
import java.net.*;
/**
 *
 *
 */
public class SoundApplet extends java.applet.Applet {

	public void start() {

		try {

      URL url = SoundApplet.class.getResource("/nock.au");
      System.out.println("URL:"+url.toString());
			AudioClip ac = getAudioClip(url);
			for (int i = 1; i < 60; i++) {
				try {
					Thread.sleep(10);
				} catch (InterruptedException e1) {
					e1.printStackTrace();
				}
				ac.play();
			}

			Thread.sleep(1000);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
I have no workaround.

Release Regression From : 1.3.1
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.
###@###.### 2005-04-06 17:49:13 GMT

Comments
EVALUATION Another issue found (related with short sounds) in DirectSound drain() implementation (native code)
09-08-2005

EVALUATION The problem is that now JavaSoundAudioClip.lastPlayCall keeps time of last startImpl(...) method call (but not real sound playing start). lastPlayCall should keep time of last sound playing start. ###@###.### 2005-05-27 14:30:40 GMT
27-05-2005