Exemplo n.º 1
0
 public static boolean equals(
     MidiDevice.Info info, String name, String vendor, String version, String description) {
   return eq(info.getName(), name)
       && eq(info.getVendor(), vendor)
       && eq(info.getVersion(), version)
       && eq(info.getDescription(), description);
 }
Exemplo n.º 2
0
  public final boolean equals(Object obj) {
    if (obj instanceof BlueMidiDevice) {
      BlueMidiDevice dev2 = (BlueMidiDevice) obj;
      MidiDevice.Info info2 = dev2.info;

      return (info.getDescription().equals(info2.getDescription())
          && info.getName().equals(info2.getName())
          && info.getVendor().equals(info2.getVendor())
          && info.getVersion().equals(info2.getVersion()));
    }
    return false;
  }
Exemplo n.º 3
0
  /**
   * Indicates whether the device provider supports the device represented by the specified device
   * info object.
   *
   * @param info an info object that describes the device for which support is queried
   * @return <code>true</code> if the specified device is supported, otherwise <code>false</code>
   */
  public boolean isDeviceSupported(MidiDevice.Info info) {

    MidiDevice.Info infos[] = getDeviceInfo();

    for (int i = 0; i < infos.length; i++) {
      if (info.equals(infos[i])) {
        return true;
      }
    }
    return false;
  }
Exemplo n.º 4
0
 public static boolean equals(MidiDevice.Info a, MidiDevice.Info b) {
   return equals(a, b.getName(), b.getVendor(), b.getVersion(), b.getDescription());
 }
Exemplo n.º 5
0
 public String getName() {
   javax.sound.midi.MidiDevice.Info info = device.getDeviceInfo();
   return info.getName() + " " + info.getVendor();
 }
Exemplo n.º 6
0
 public String toString() {
   if (info != null) {
     return info.getName();
   }
   return "Error";
 }
Exemplo n.º 7
0
 public String getSaveName() {
   return info.getDescription() + info.getName() + info.getVendor() + info.getVersion();
 }