<Sound Dev> [9] Review Request: 8133677 Specification of AudioFileReader should be clarifed

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Aug 19 15:24:08 UTC 2015


Hello.
Please review the fix for jdk9.
This is specification update of AudioFileReader. CCC request will be 
filed after technical review.

According to specification if AudioFileReader.getAudioFileFormat() 
returns a correct format then 'reset' of stream is not strictly 
necessary. But it was implemented like that in 1.3.0 - 1.8 in most of 
our readers except SoftMidiAudioFileReader which was added in jdk7. In 
the fix I removed the sentence that the reader should reset the stream 
only if it is not supported. Note that the same sentence already used in 
the similar API for midi [1].

The fix of specification also required some changes in 
SoftMidiAudioFileReader.java, it now uses the general implementations of 
some methods from SunFileReader.java.

Bug: https://bugs.openjdk.java.net/browse/JDK-8133677
Webrev can be found at: http://cr.openjdk.java.net/~serb/8133677/webrev.00

[1] 
http://docs.oracle.com/javase/7/docs/api/javax/sound/midi/MidiSystem.html#getMidiFileFormat%28java.io.InputStream%29

-- 
Best regards, Sergey.



More information about the sound-dev mailing list