本文整理汇总了Java中javax.sound.midi.MidiDevice.Info.equals方法的典型用法代码示例。如果您正苦于以下问题:Java Info.equals方法的具体用法?Java Info.equals怎么用?Java Info.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.sound.midi.MidiDevice.Info
的用法示例。
在下文中一共展示了Info.equals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDevice
import javax.sound.midi.MidiDevice.Info; //导入方法依赖的package包/类
public MidiDevice getDevice(Info info)
{
for (int i = 0; i < infos.length; i++)
{
if (info.equals(infos[i]))
{
return new DSSISynthesizer(infos[i],
infos[i].soname,
infos[i].index);
}
}
throw new IllegalArgumentException("Don't recognize MIDI device " + info);
}
示例2: getDevice
import javax.sound.midi.MidiDevice.Info; //导入方法依赖的package包/类
public MidiDevice getDevice(Info info)
{
for (int i = 0; i < infos.length; i++)
{
if (info.equals(infos[i]))
{
return infos[i].getDevice();
}
}
throw new IllegalArgumentException("Don't recognize MIDI device " + info);
}
示例3: getDevice
import javax.sound.midi.MidiDevice.Info; //导入方法依赖的package包/类
public MidiDevice getDevice(Info info)
{
for (int i = 0; i < infos.length; i++)
{
if (info.equals(infos[i]))
{
return new DSSISynthesizer(infos[i],
infos[i].soname,
infos[i].index);
}
}
throw new IllegalArgumentException("Don't recognize MIDI device " + info);
}
示例4: getMidiDevice
import javax.sound.midi.MidiDevice.Info; //导入方法依赖的package包/类
public static MidiDevice getMidiDevice(MidiDevice.Info info)
throws MidiUnavailableException {
//FIXME
/*
* this method must to throw out MidiUnavailableException if requested device
* is not available
*/
/*
* obtain the list of MidiDeviceProviders
*/
List<?> deviceProviders = ProviderService.getProviders(midiDeviceProviderPath);
/*
* find device that describes by parameter info and return it
*/
for (int i = 0; i < deviceProviders.size(); i++) {
MidiDevice.Info[] deviceInfo = ((MidiDeviceProvider) deviceProviders.get(i)).getDeviceInfo();
for (Info element : deviceInfo) {
if (element.equals(info)) {
return ((MidiDeviceProvider) deviceProviders.get(i)).getDevice(info);
}
}
}
/*
* if we can't find device with requested info, we throw out IllegalArgumentException
*/
throw new IllegalArgumentException(Messages.getString("sound.1F", info.getName()));
}
示例5: getMidiDevice
import javax.sound.midi.MidiDevice.Info; //导入方法依赖的package包/类
public static MidiDevice getMidiDevice(MidiDevice.Info info)
throws MidiUnavailableException {
//FIXME
/*
* this method must to throw out MidiUnavailableException if requested device
* is not available
*/
/*
* obtain the list of MidiDeviceProviders
*/
List<?> deviceProviders = ProviderService.getProviders(midiDeviceProviderPath);
/*
* find device that describes by parameter info and return it
*/
for (int i = 0; i < deviceProviders.size(); i++) {
MidiDevice.Info[] deviceInfo = ((MidiDeviceProvider) deviceProviders.get(i)).getDeviceInfo();
for (Info element : deviceInfo) {
if (element.equals(info)) {
return ((MidiDeviceProvider) deviceProviders.get(i)).getDevice(info);
}
}
}
/*
* if we can't find device with requested info, we throw out IllegalArgumentException
*/
throw new IllegalArgumentException("Requested device not installed: " + info.getName());
}