Ejemplo n.º 1
0
 /**
  * Use this Methode to close an output. You can close it with its number or name. There is no need
  * of closing the ports, as promidi closes them when the applet is closed.
  *
  * @invisible
  * @param outputNumber int, number of the output to close
  */
 public void closeOutput(int outputNumber) {
   try {
     MidiOutDevice outDevice = (MidiOutDevice) midiOutDevices.get(outputNumber);
     outDevice.close();
   } catch (ArrayIndexOutOfBoundsException e) {
     throw new UnavailablePortException(
         "You wanted to close the unavailable output "
             + outputNumber
             + ". The available outputs are 0 - "
             + (midiOutDevices.size() - 1)
             + ".");
   }
 }