2216 |
mid.setActive(Boolean.parseBoolean(s)); |
mid.setActive(Boolean.parseBoolean(s)); |
2217 |
} else if(s.startsWith("PORTS: ")) { |
} else if(s.startsWith("PORTS: ")) { |
2218 |
s = s.substring("PORTS: ".length()); |
s = s.substring("PORTS: ".length()); |
2219 |
int ports = Parser.parseInt(s); |
|
2220 |
MidiPort[] midiPorts = new MidiPort[ports > 0 ? ports : 0]; |
Parameter<Integer> ports = (Parameter<Integer>) |
2221 |
|
getMidiInputDriverParameterInfo(drv, "PORTS"); |
2222 |
|
|
2223 |
|
ports.parseValue(s); |
2224 |
|
mid.setPortsParameter(ports); |
2225 |
|
|
2226 |
|
int j = ports.getValue(); |
2227 |
|
MidiPort[] midiPorts = new MidiPort[j > 0 ? j : 0]; |
2228 |
|
|
2229 |
for(int i = 0; i < midiPorts.length; i++) |
for(int i = 0; i < midiPorts.length; i++) |
2230 |
midiPorts[i] = getMidiInputPortInfo(deviceId, i); |
midiPorts[i] = getMidiInputPortInfo(deviceId, i); |