1 7 8 package javax.sound.midi; 9 10 import java.util.List ; 11 12 92 93 public interface MidiDevice { 94 95 96 102 public Info getDeviceInfo(); 103 104 105 126 public void open() throws MidiUnavailableException ; 127 128 129 140 public void close(); 141 142 143 151 public boolean isOpen(); 152 153 154 164 public long getMicrosecondPosition(); 165 166 167 173 public int getMaxReceivers(); 174 175 176 182 public int getMaxTransmitters(); 183 184 185 201 public Receiver getReceiver() throws MidiUnavailableException ; 202 203 204 212 List <Receiver > getReceivers(); 213 214 215 231 public Transmitter getTransmitter() throws MidiUnavailableException ; 232 233 234 242 List <Transmitter > getTransmitters(); 243 244 245 246 253 public static class Info { 254 255 258 private String name; 259 260 263 private String vendor; 264 265 268 private String description; 269 270 273 private String version; 274 275 276 284 protected Info(String name, String vendor, String description, String version) { 285 286 this.name = name; 287 this.vendor = vendor; 288 this.description = description; 289 this.version = version; 290 } 291 292 293 301 public final boolean equals(Object obj) { 302 return super.equals(obj); 303 } 304 305 306 309 public final int hashCode() { 310 return super.hashCode(); 311 } 312 313 314 319 public final String getName() { 320 return name; 321 } 322 323 324 328 public final String getVendor() { 329 return vendor; 330 } 331 332 333 337 public final String getDescription() { 338 return description; 339 } 340 341 342 346 public final String getVersion() { 347 return version; 348 } 349 350 351 356 public final String toString() { 357 return name; 358 } 359 } 361 362 } 363 | Popular Tags |