use of javax.sound.midi.MidiDevice.Info in project jdk8u_jdk by JetBrains.
the class GetDevice method main.
public static void main(String[] args) throws Exception {
SoftProvider provider = new SoftProvider();
Info[] infos = provider.getDeviceInfo();
assertTrue(infos.length > 0);
for (int i = 0; i < infos.length; i++) {
assertTrue(infos[i] != null);
MidiDevice d = provider.getDevice(infos[i]);
assertTrue(d instanceof SoftSynthesizer);
}
assertTrue(provider.getDevice(new FakeInfo()) == null);
}
Aggregations