7076354: JavaSoundAudioClip stop() Method sequencer.addMetaEventListener(this); wrong?
authorserb
Tue, 05 Apr 2016 17:44:19 +0300
changeset 37557 00d5cb18c86b
parent 37556 80409fc0c8ed
child 37558 1edee490c91c
7076354: JavaSoundAudioClip stop() Method sequencer.addMetaEventListener(this); wrong? Reviewed-by: amenkov
jdk/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java	Tue Apr 05 17:30:23 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java	Tue Apr 05 17:44:19 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -232,7 +232,7 @@
         } else if (sequencer != null) {
             try {
                 sequencerloop = false;
-                sequencer.addMetaEventListener(this);
+                sequencer.removeMetaEventListener(this);
                 sequencer.stop();
             } catch (Exception e3) {
                 if (Printer.err) e3.printStackTrace();