src/share/classes/com/sun/media/sound/AbstractMidiDevice.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -665,11 +665,11 @@
                             midiOutReceiver.sendPackedMidiMessage(packedMessage, timeStamp);
                         }
                     } else {
                         if (TRACE_TRANSMITTER) Printer.println("Sending packed message to "+size+" transmitter's receivers");
                         for (int i = 0; i < size; i++) {
-                            Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver();
+                            Receiver receiver = transmitters.get(i).getReceiver();
                             if (receiver != null) {
                                 if (optimizedReceiverCount > 0) {
                                     if (receiver instanceof MidiOutDevice.MidiOutReceiver) {
                                         ((MidiOutDevice.MidiOutReceiver) receiver).sendPackedMidiMessage(packedMessage, timeStamp);
                                     } else {

@@ -691,11 +691,11 @@
             try {
                 synchronized(transmitters) {
                     int size = transmitters.size();
                     if (TRACE_TRANSMITTER) Printer.println("Sending long message to "+size+" transmitter's receivers");
                     for (int i = 0; i < size; i++) {
-                        Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver();
+                        Receiver receiver = transmitters.get(i).getReceiver();
                         if (receiver != null) {
                             //$$fb 2002-04-02: SysexMessages are mutable, so
                             // an application could change the contents of this object,
                             // or try to use the object later. So we can't get around object creation
                             // But the array need not be unique for each FastSysexMessage object,

@@ -727,11 +727,11 @@
                         midiOutReceiver.send(message, timeStamp);
                     }
                 } else {
                     if (TRACE_TRANSMITTER) Printer.println("Sending MIDI message to "+size+" transmitter's receivers");
                     for (int i = 0; i < size; i++) {
-                        Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver();
+                        Receiver receiver = transmitters.get(i).getReceiver();
                         if (receiver != null) {
                             //$$fb 2002-04-02: ShortMessages are mutable, so
                             // an application could change the contents of this object,
                             // or try to use the object later.
                             // We violate this spec here, to avoid costly (and gc-intensive)