FULL PRODUCT VERSION :
Java Plug-in 1.6.0-rc
ADDITIONAL OS VERSION INFORMATION :
Windows XP (also tested on Windows Vista)
EXTRA RELEVANT SYSTEM CONFIGURATION :
IE7, Firefox2.0, Mozilla 1.7.13
A DESCRIPTION OF THE PROBLEM :
Using a variety of browsers with the jre1.6 plugin our audio applet support no longer plays correctly. The audio is heard as a loud pitched screeching. Our audio/applet has been working successfully in all previous versions of the jre 1.3-1.5+.
The audio format is PCM_SIGNED, 22Khz.
The audio driver on my machine is SoundMax Digital audio.
I can provide a URL with the playback mechanism if necessary.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Play a PCM_SIGNED audio format using standard java sound interface with the 1.6 plugin in any of the supported browsers (IE, Mozilla, FireFox).
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The playback audio to be identical to that of the 1.5 jre.
ACTUAL -
The end result is a high pitched screeching noise. The audio is unintelligable.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages appear in the java console.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/**
* An 1st order filter, allowing you to upsample to any rate (not just
* a multiple of the original rate.
*
* This upsampling algorithm seems to provide better quality than the other
* upsampler method. I'm keeping them both in here for know for reference.
*/
private short [] upsampler2(short [] sArray) {
double oldRate = 8000.0; // 8Khz
double newRate = 22000.0; // 22Khz
// calculate the total playing time of the original audio
double time = (double) sArray.length/oldRate;
// calculate the number of frames needed for the new sound sample
int newNumFrames = (int) Math.round(time * newRate);
int oldNumFrames = sArray.length;
short [] outArray = new short[newNumFrames];
// for each frame in the output array
for (int i = 0; i < newNumFrames; i++) {
double t = (double) i/ newRate;
int nearest = (int) ( t * oldRate );
short sample = 0;
if( nearest < oldNumFrames ) {
sample = sArray[nearest];
}
// for adding samples this sample is proportionally
// between the nearest and the next
double error = ( t * oldRate ) - (double) nearest;
int diff = 0;
if( nearest+1 < oldNumFrames ) {
diff = sArray[nearest+1] - sample;
}
sample += (int) Math.round( (double) diff * error );
outArray[i] = sample;
}
return outArray;
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
We have found no workaround other than rolling back to an earlier jre.
I have tested the 1.6 JDK inside of JBuilder and it works as expected. It is only the plugin that seems to be broken.
Java Plug-in 1.6.0-rc
ADDITIONAL OS VERSION INFORMATION :
Windows XP (also tested on Windows Vista)
EXTRA RELEVANT SYSTEM CONFIGURATION :
IE7, Firefox2.0, Mozilla 1.7.13
A DESCRIPTION OF THE PROBLEM :
Using a variety of browsers with the jre1.6 plugin our audio applet support no longer plays correctly. The audio is heard as a loud pitched screeching. Our audio/applet has been working successfully in all previous versions of the jre 1.3-1.5+.
The audio format is PCM_SIGNED, 22Khz.
The audio driver on my machine is SoundMax Digital audio.
I can provide a URL with the playback mechanism if necessary.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Play a PCM_SIGNED audio format using standard java sound interface with the 1.6 plugin in any of the supported browsers (IE, Mozilla, FireFox).
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The playback audio to be identical to that of the 1.5 jre.
ACTUAL -
The end result is a high pitched screeching noise. The audio is unintelligable.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages appear in the java console.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/**
* An 1st order filter, allowing you to upsample to any rate (not just
* a multiple of the original rate.
*
* This upsampling algorithm seems to provide better quality than the other
* upsampler method. I'm keeping them both in here for know for reference.
*/
private short [] upsampler2(short [] sArray) {
double oldRate = 8000.0; // 8Khz
double newRate = 22000.0; // 22Khz
// calculate the total playing time of the original audio
double time = (double) sArray.length/oldRate;
// calculate the number of frames needed for the new sound sample
int newNumFrames = (int) Math.round(time * newRate);
int oldNumFrames = sArray.length;
short [] outArray = new short[newNumFrames];
// for each frame in the output array
for (int i = 0; i < newNumFrames; i++) {
double t = (double) i/ newRate;
int nearest = (int) ( t * oldRate );
short sample = 0;
if( nearest < oldNumFrames ) {
sample = sArray[nearest];
}
// for adding samples this sample is proportionally
// between the nearest and the next
double error = ( t * oldRate ) - (double) nearest;
int diff = 0;
if( nearest+1 < oldNumFrames ) {
diff = sArray[nearest+1] - sample;
}
sample += (int) Math.round( (double) diff * error );
outArray[i] = sample;
}
return outArray;
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
We have found no workaround other than rolling back to an earlier jre.
I have tested the 1.6 JDK inside of JBuilder and it works as expected. It is only the plugin that seems to be broken.
- duplicates
-
JDK-6512534 Strange behavior of Client VM (Unexpected value change on the specific situation)
-
- Resolved
-