Name: rl43681 Date: 08/28/2003
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
JavaSound writes many sample rates incorrectly to AIFF files. The problem appears to be with the method write_ieee_extended of class com.sun.media.sound.AiffFileWriter, which is supposed to write a double precision floating point number to a DataOutputStream as an 80-bit SANE (Standard Apple Numerics Environment) floating point number. This is the format in which the sample rate is stored in an AIFF file. The method writes the common sample rates 8000, 11025, 16000, 22050, 24000, 32000, 44100, and 48000 correctly, but it fails for many other sample rates, both integral and not.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the program included below.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The program should create an AIFF file with a sample rate of 10000 Hz.
ACTUAL -
The program creates an AIFF file with a sample rate of 1808 Hz.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
source has been saved as attachment
-----------END SOURCE--------------
(Incident Review ID: 200766)
======================================================================
###@###.### 2003-08-28