JDK-4914639 : JavaSound writes wrong sample rates to AIFF files
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-08-28
  • Updated: 2003-10-14
  • Resolved: 2003-10-14
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
5.0 betaFixed
Description
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

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger-beta
14-06-2004

PUBLIC COMMENTS JavaSound writes wrong sample rates to AIFF files
10-06-2004

EVALUATION ###@###.### 2003-09-26 Reproducable with tiger. Needs to be fixed. The solution suggested by the submitter works. However, it has to be checked if we have permission to use the supplied auxiliary class Sane80. ###@###.### 2003-10-14 Fixed by implementing an own conversion routine. ###@###.### 2003-10-14
14-10-2003