+1
-phil.
On 02/05/2016 09:20 AM, Sergey Bylokhov wrote:
Hello, Audio Guru.
Please review the fix for jdk9.
There are two bugs in this area:
- in the WaveExtensibleFileReader.java/WaveFloatFileReader.java we
create the AudioInputStream using the data size in bytes instead of
the the size in frames. In the fix the size in bytes is divided by the
size of the frame.
- in AiffFileWriter.java we incorrectly calculate the data size in
bytes(for example if the sample size is less than 8). instead of
numFrames * channels * sampleSize / 8
it should be
numFrames * channels * ((sampleSize + 7) / 8)
And when later we read this data in AiffFilereader we incorrectly
calculate the FrameLength.
In the test I created some fake stream and converted it to a different
formats with expectation that FrameLength will be preserved.
Bug: https://bugs.openjdk.java.net/browse/JDK-8038139
Webrev can be found at:
http://cr.openjdk.java.net/~serb/8038139/webrev.00