Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4914639
Votes 0
Synopsis JavaSound writes wrong sample rates to AIFF files
Category java:classes_sound
Reported Against 1.4.2
Release Fixed 1.5(tiger-beta)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs
Submit Date 28-AUG-2003
Description


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 :
 customer  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) 
======================================================================
  xxxxx@xxxxx   2003-08-28
Work Around
N/A
Evaluation
  xxxxx@xxxxx   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.

  xxxxx@xxxxx   2003-10-14
Fixed by implementing an own conversion routine.
  xxxxx@xxxxx   2003-10-14
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang