<Sound Dev>  Review Request: 8064800 AudioSystem/WaveFileWriter can't write PCM_FLOAT, but writes it anyway
philip.race at oracle.com
Thu Jan 7 21:43:56 UTC 2016
Looks good to me.
On 01/07/2016 12:49 PM, Sergey Bylokhov wrote:
> Hello, Audio Guru.
> Please review the fix for jdk9.
> Support of the PCM_FLOAT encoding was added to the jdk7, but some
> important things were forgotten:
> - The new WaveFloatFileWriter.java was not added to the
> ./services/javax.sound.sampled.spi.AudioFileWriter, which means that
> it is never used by the java sound.
> - The old writers(AiffFileWriter, AuFileWriter, WaveFileWriter) was
> written in an assumption that they support all possible encoding.
> - In the fix I reused isFileTypeSupported() method which checks the
> encoding of the stream.
> - In the test some of the data are commented or skipped: for example
> we support float&32bits only but we do not check this in the
> isFileTypeSupported. Same for "channels = AudioSystem.NOT_SPECIFIED"
> the isFileTypeSupported() returns true but write() method fails, etc.
> I plan to fix it separately.
> +cleanup of the related methods in AudioSystem.java.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8064800
> Webrev can be found at:
More information about the sound-dev