Lines Matching refs:device

109  * and the device name, separated by the hash mark ("#").
112 * MIDI device provider} class. The device name is matched against
115 * Either the class name, or the device name may be omitted.
128 * <p>If a device name is specified, the resulting list of
134 * is found, or the device name is not specified,
135 * the first suitable device from the resulting
137 * a device is suitable if it implements the respective
138 * interface; whereas for Receiver and Transmitter, a device is
149 * in the list of installed MIDI device providers,
150 * the first <code>Receiver</code> device with name
179 * corresponding device object, by invoking
183 * for each installed MIDI device. If no such devices are installed,
203 * Obtains the requested MIDI device.
205 * @param info a device information object representing the desired device.
206 * @return the requested device
207 * @throws MidiUnavailableException if the requested device is not available
210 * a MIDI device installed on the system
219 MidiDevice device = provider.getDevice(info);
220 return device;
223 throw new IllegalArgumentException("Requested device not installed: " + info);
229 * or other default device.
236 * it is used to identify the device that provides the default receiver.
242 * <p>If a native receiver provided by the default device does not implement
252 * device by calling {@link javax.sound.midi.Receiver#close close}
263 * or no device providing receivers is installed in the system
267 MidiDevice device = getDefaultDeviceWrapper(Receiver.class);
269 if (device instanceof ReferenceCountingDevice) {
270 receiver = ((ReferenceCountingDevice) device).getReceiverReferenceCounting();
272 receiver = device.getReceiver();
275 receiver = new MidiDeviceReceiverEnvelope(device, receiver);
290 * it is used to identify the device that provides the default transmitter.
293 * <p>If a native transmitter provided by the default device does not implement
303 * opened device by calling {@link
314 * or no device providing transmitters is installed in the system
318 MidiDevice device = getDefaultDeviceWrapper(Transmitter.class);
320 if (device instanceof ReferenceCountingDevice) {
321 transmitter = ((ReferenceCountingDevice) device).getTransmitterReferenceCounting();
323 transmitter = device.getTransmitter();
326 transmitter = new MidiDeviceTransmitterEnvelope(device, transmitter);
354 * a default device.
367 * connection to the default device.
396 * connected to a default device.
411 * connection to the default device.
416 * play the sequencer on a MIDI device, or a <code>Synthesizer</code>,
1103 * @param deviceClass The requested device type, one of Synthesizer.class,
1122 * @param deviceClass The requested device type, one of Synthesizer.class,
1130 MidiDevice device;
1136 device = getNamedDevice(instanceName, defaultProvider, deviceClass);
1137 if (device != null) {
1138 return device;
1141 device = getFirstDevice(defaultProvider, deviceClass);
1142 if (device != null) {
1143 return device;
1149 provider class specified, and no appropriate device available or
1152 device = getNamedDevice(instanceName, providers, deviceClass);
1153 if (device != null) {
1154 return device;
1160 device = getFirstDevice(providers, deviceClass);
1161 if (device != null) {
1162 return device;
1164 throw new IllegalArgumentException("Requested device not installed");
1191 @param deviceClass The requested device type, one of Synthesizer.class,
1199 MidiDevice device;
1201 device = getNamedDevice(deviceName, provider, deviceClass,
1203 if (device != null) {
1204 return device;
1209 device = getNamedDevice(deviceName, provider, deviceClass,
1211 if (device != null) {
1212 return device;
1223 @param deviceClass The requested device type, one of Synthesizer.class,
1236 MidiDevice device = provider.getDevice(infos[i]);
1237 if (isAppropriateDevice(device, deviceClass,
1239 return device;
1252 @param deviceClass The requested device type, one of Synthesizer.class,
1259 MidiDevice device;
1261 device = getNamedDevice(deviceName, providers, deviceClass,
1263 if (device != null) {
1264 return device;
1269 device = getNamedDevice(deviceName, providers, deviceClass,
1271 if (device != null) {
1272 return device;
1285 @param deviceClass The requested device type, one of Synthesizer.class,
1296 MidiDevice device = getNamedDevice(deviceName, provider,
1300 if (device != null) {
1301 return device;
1308 /** From a given MidiDeviceProvider, return the first appropriate device.
1310 @param deviceClass The requested device type, one of Synthesizer.class,
1313 appropriate device is found.
1317 MidiDevice device;
1319 device = getFirstDevice(provider, deviceClass,
1321 if (device != null) {
1322 return device;
1327 device = getFirstDevice(provider, deviceClass,
1329 if (device != null) {
1330 return device;
1338 /** From a given MidiDeviceProvider, return the first appropriate device.
1340 @param deviceClass The requested device type, one of Synthesizer.class,
1343 appropriate device is found.
1351 MidiDevice device = provider.getDevice(infos[j]);
1352 if (isAppropriateDevice(device, deviceClass,
1354 return device;
1364 @param deviceClass The requested device type, one of Synthesizer.class,
1371 MidiDevice device;
1373 device = getFirstDevice(providers, deviceClass,
1375 if (device != null) {
1376 return device;
1381 device = getFirstDevice(providers, deviceClass,
1383 if (device != null) {
1384 return device;
1395 @param deviceClass The requested device type, one of Synthesizer.class,
1406 MidiDevice device = getFirstDevice(provider, deviceClass,
1409 if (device != null) {
1410 return device;
1418 If deviceClass is Synthesizer or Sequencer, a device implementing
1420 is Receiver or Transmitter, a device is considered appropriate if
1424 @param device the MidiDevice to test
1428 effect for deviceClass Receiver and Transmitter. For other device
1433 effect for deviceClass Receiver and Transmitter. For other device
1435 @return true if the device is considered appropriate according to the
1438 private static boolean isAppropriateDevice(MidiDevice device,
1442 if (deviceClass.isInstance(device)) {
1449 // true, we require device instances to be
1453 if ( (! (device instanceof Sequencer) &&
1454 ! (device instanceof Synthesizer) ) ||
1455 ((device instanceof Sequencer) && allowSequencer) ||
1456 ((device instanceof Synthesizer) && allowSynthesizer)) {
1457 // And of cource, the device has to be able to provide
1460 device.getMaxReceivers() != 0) ||
1462 device.getMaxTransmitters() != 0)) {