<Sound Dev>  Review Request: 7076354 JavaSoundAudioClip stop() Method sequencer.addMetaEventListener(this); wrong?
danrollo at gmail.com
Fri Apr 1 17:37:05 UTC 2016
> On Apr 1, 2016, at 11:57 AM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
> 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.
> Bug: https://bugs.openjdk.java.net/browse/JDK-7076354
> Webrev can be found at: http://cr.openjdk.java.net/~serb/7076354/webrev.00
> Best regards, Sergey.
More information about the sound-dev