|
Quick Lists
|
|
Bug ID:
|
4935508
|
|
Votes
|
0
|
|
Synopsis
|
SPEC: AudioInputStream.read should specify non-integral frame size behavior
|
|
Category
|
java:classes_sound
|
|
Reported Against
|
1.4.2
|
|
Release Fixed
|
1.5(tiger-b28)
|
|
State
|
10-Fix Delivered,
request for enhancement
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
4945308
|
|
Submit Date
|
09-OCT-2003
|
|
Description
|
A DESCRIPTION OF THE REQUEST :
In the Javadoc for the AudioInputStream.read(...) methods, it would be customer to mention that, like TargetDataLine.read method, the number of bytes actually read is always a multiple of the frame size (in bytes).
If the number of bytes asked is not a multiple of the frame size, the AudioInputStream.read(...) method will append zeros at the end of the array, unlike the TargetDataLine method who will throw an IllegalArgumentException!
JUSTIFICATION :
necessary for clarity :-)
(Incident Review ID: 214413)
======================================================================
xxxxx@xxxxx 2003-11-03
Checked in fix
|
|
Work Around
|
N/A
|
|
Evaluation
|
xxxxx@xxxxx 2003-10-10
Sounds like a valid request. I'm not sure how to solve this missing spec:
1) throw IAE if number of requested bytes is not integral frame
2) only read rounded down number of bytes (what I see as current behavior)
3) current behavior, what he claims: append 0's ???? should *not* be done.
I tend to 2) and that it should be documented. Introducing IAE for that would unnecessarily break existing apps. 3) doesn't make sense. Therefore, I change this bug to be a spec bug.
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |