<Sound Dev>  Review Request: 7076354 JavaSoundAudioClip stop() Method sequencer.addMetaEventListener(this); wrong?
Sergey.Bylokhov at oracle.com
Fri Apr 1 15:57:22 UTC 2016
Please review the trivial fix for jdk9.
We incorrectly tries to add the listener instead of removing it. It
cannot caused a big memory leak because the second add is noop if the
same listener was added already.
There is no test in the fix, because this code is not executed in
current version of jdk. The JavaSoundAudioClip first tries to open the
file(or stream) by the AudioSystem, then by the MidiSystem. But after
the gervill integration AudioSystem is able to play the midi files(it is
implemented in the SoftMidiAudioFileReader), so the MidiSystem is never
checked and the JavaSoundAudioClip.sequencer is never initialized.
But I manually checked that if SoftMidiAudioFileReader is removed then
the code is executed and the listener will be removed.
Webrev can be found at: http://cr.openjdk.java.net/~serb/7076354/webrev.00
Best regards, Sergey.
More information about the sound-dev