542 |
if(s.startsWith("NAME ")) { |
if(s.startsWith("NAME ")) { |
543 |
String[] list; |
String[] list; |
544 |
try { |
try { |
545 |
list = parseStringList(s.substring("NAME ".length()), ' '); |
list = parseQuotedStringList(s.substring("NAME ".length()), ' '); |
546 |
if(list.length != 2) throw new LscpException(); |
if(list.length != 2) throw new LscpException(); |
547 |
e = new InstrumentsDbEvent(this, list[0], list[1]); |
e = new InstrumentsDbEvent(this, list[0], list[1]); |
548 |
for(InstrumentsDbListener l : llID) { |
for(InstrumentsDbListener l : llID) { |
569 |
if(s.startsWith("NAME ")) { |
if(s.startsWith("NAME ")) { |
570 |
String[] list; |
String[] list; |
571 |
try { |
try { |
572 |
list = parseStringList(s.substring("NAME ".length()), ' '); |
list = parseQuotedStringList(s.substring("NAME ".length()), ' '); |
573 |
if(list.length != 2) throw new LscpException(); |
if(list.length != 2) throw new LscpException(); |
574 |
e = new InstrumentsDbEvent(this, list[0], list[1]); |
e = new InstrumentsDbEvent(this, list[0], list[1]); |
575 |
for(InstrumentsDbListener l : llID) { |
for(InstrumentsDbListener l : llID) { |
1355 |
/** |
/** |
1356 |
* Gets detailed information about a specific audio output driver. |
* Gets detailed information about a specific audio output driver. |
1357 |
* @param driverName The name of the audio output driver. |
* @param driverName The name of the audio output driver. |
1358 |
* |
* @param depList An optional list of dependences parameters. |
1359 |
* @return An <code>AudioOutputDriver</code> object containing |
* @return An <code>AudioOutputDriver</code> object containing |
1360 |
* information about the specified audio output driver. |
* information about the specified audio output driver. |
1361 |
* |
* |
1365 |
* |
* |
1366 |
* @see #getAudioOutputDriverNames |
* @see #getAudioOutputDriverNames |
1367 |
*/ |
*/ |
1368 |
private synchronized AudioOutputDriver |
public synchronized AudioOutputDriver |
1369 |
getAudioOutputDriverInfo(String driverName) throws IOException, LscpException, LSException { |
getAudioOutputDriverInfo(String driverName, Parameter... depList) |
1370 |
|
throws IOException, LscpException, LSException { |
1371 |
|
|
1372 |
verifyConnection(); |
verifyConnection(); |
1373 |
out.writeLine("GET AUDIO_OUTPUT_DRIVER INFO " + driverName); |
out.writeLine("GET AUDIO_OUTPUT_DRIVER INFO " + driverName); |
1374 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
1378 |
aod.setName(driverName); |
aod.setName(driverName); |
1379 |
|
|
1380 |
for(String s : aod.getParameterNames()) |
for(String s : aod.getParameterNames()) |
1381 |
aod.addParameter(getAudioOutputDriverParameterInfo(driverName, s)); |
aod.addParameter(getAudioOutputDriverParameterInfo(driverName, s, depList)); |
1382 |
|
|
1383 |
return aod; |
return aod; |
1384 |
} |
} |
1412 |
StringBuffer args = new StringBuffer(driver); |
StringBuffer args = new StringBuffer(driver); |
1413 |
args.append(' ').append(param); |
args.append(' ').append(param); |
1414 |
|
|
1415 |
for(Parameter p : deplist) |
for(Parameter p : deplist) { |
1416 |
|
if(p.getValue() == null) continue; |
1417 |
args.append(' ').append(p.getName()).append('=').append(p.getStringValue()); |
args.append(' ').append(p.getName()).append('=').append(p.getStringValue()); |
1418 |
|
} |
1419 |
|
|
1420 |
out.writeLine("GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO " + args.toString()); |
out.writeLine("GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO " + args.toString()); |
1421 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
1476 |
verifyConnection(); |
verifyConnection(); |
1477 |
StringBuffer args = new StringBuffer(aoDriver); |
StringBuffer args = new StringBuffer(aoDriver); |
1478 |
|
|
1479 |
for(Parameter p : paramList) |
for(Parameter p : paramList) { |
1480 |
|
if(p.getValue() == null) continue; |
1481 |
args.append(' ').append(p.getName()).append('=').append(p.getStringValue()); |
args.append(' ').append(p.getName()).append('=').append(p.getStringValue()); |
1482 |
|
} |
1483 |
|
|
1484 |
out.writeLine("CREATE AUDIO_OUTPUT_DEVICE " + args.toString()); |
out.writeLine("CREATE AUDIO_OUTPUT_DEVICE " + args.toString()); |
1485 |
if(getPrintOnlyMode()) return -1; |
if(getPrintOnlyMode()) return -1; |
1940 |
/** |
/** |
1941 |
* Gets detailed information about a specific MIDI input driver. |
* Gets detailed information about a specific MIDI input driver. |
1942 |
* @param driverName The name of the MIDI input driver. |
* @param driverName The name of the MIDI input driver. |
1943 |
* |
* @param depList An optional list of dependences parameters. |
1944 |
* @return A <code>MidiInputDriver</code> object containing |
* @return A <code>MidiInputDriver</code> object containing |
1945 |
* information about the specified MIDI input driver. |
* information about the specified MIDI input driver. |
1946 |
* |
* |
1950 |
* |
* |
1951 |
* @see #getMidiInputDriverNames |
* @see #getMidiInputDriverNames |
1952 |
*/ |
*/ |
1953 |
private synchronized MidiInputDriver |
public synchronized MidiInputDriver |
1954 |
getMidiInputDriverInfo(String driverName) throws IOException, LscpException, LSException { |
getMidiInputDriverInfo(String driverName, Parameter... depList) |
1955 |
|
throws IOException, LscpException, LSException { |
1956 |
|
|
1957 |
verifyConnection(); |
verifyConnection(); |
1958 |
out.writeLine("GET MIDI_INPUT_DRIVER INFO " + driverName); |
out.writeLine("GET MIDI_INPUT_DRIVER INFO " + driverName); |
1959 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
1964 |
mid.setName(driverName); |
mid.setName(driverName); |
1965 |
|
|
1966 |
for(String s : mid.getParameterNames()) |
for(String s : mid.getParameterNames()) |
1967 |
mid.addParameter(getMidiInputDriverParameterInfo(driverName, s)); |
mid.addParameter(getMidiInputDriverParameterInfo(driverName, s, depList)); |
1968 |
|
|
1969 |
return mid; |
return mid; |
1970 |
} |
} |
1998 |
StringBuffer args = new StringBuffer(driver); |
StringBuffer args = new StringBuffer(driver); |
1999 |
args.append(' ').append(param); |
args.append(' ').append(param); |
2000 |
|
|
2001 |
for(Parameter p : deplist) |
for(Parameter p : deplist) { |
2002 |
|
if(p.getValue() == null) continue; |
2003 |
args.append(' ').append(p.getName()).append('=').append(p.getStringValue()); |
args.append(' ').append(p.getName()).append('=').append(p.getStringValue()); |
2004 |
|
} |
2005 |
|
|
2006 |
out.writeLine("GET MIDI_INPUT_DRIVER_PARAMETER INFO " + args.toString()); |
out.writeLine("GET MIDI_INPUT_DRIVER_PARAMETER INFO " + args.toString()); |
2007 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
2063 |
verifyConnection(); |
verifyConnection(); |
2064 |
StringBuffer args = new StringBuffer(miDriver); |
StringBuffer args = new StringBuffer(miDriver); |
2065 |
|
|
2066 |
for(Parameter p : paramList) |
for(Parameter p : paramList) { |
2067 |
|
if(p.getValue() == null) continue; |
2068 |
args.append(' ').append(p.getName()).append('=').append(p.getStringValue()); |
args.append(' ').append(p.getName()).append('=').append(p.getStringValue()); |
2069 |
|
} |
2070 |
|
|
2071 |
out.writeLine("CREATE MIDI_INPUT_DEVICE " + args.toString()); |
out.writeLine("CREATE MIDI_INPUT_DEVICE " + args.toString()); |
2072 |
if(getPrintOnlyMode()) return -1; |
if(getPrintOnlyMode()) return -1; |
3040 |
out.writeLine("LIST AVAILABLE_ENGINES"); |
out.writeLine("LIST AVAILABLE_ENGINES"); |
3041 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
3042 |
|
|
3043 |
return parseStringList(getSingleLineResultSet().getResult()); |
return parseQuotedStringList(getSingleLineResultSet().getResult()); |
3044 |
} |
} |
3045 |
|
|
3046 |
/** |
/** |
3860 |
out.writeLine("LIST DB_INSTRUMENT_DIRECTORIES '" + dir + "'"); |
out.writeLine("LIST DB_INSTRUMENT_DIRECTORIES '" + dir + "'"); |
3861 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
3862 |
|
|
3863 |
return parseStringList(getSingleLineResultSet().getResult()); |
return parseQuotedStringList(getSingleLineResultSet().getResult()); |
3864 |
} |
} |
3865 |
|
|
3866 |
/** |
/** |
4341 |
out.writeLine("LIST DB_INSTRUMENTS '" + dir + "'"); |
out.writeLine("LIST DB_INSTRUMENTS '" + dir + "'"); |
4342 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
4343 |
|
|
4344 |
return parseStringList(getSingleLineResultSet().getResult()); |
return parseQuotedStringList(getSingleLineResultSet().getResult()); |
4345 |
} |
} |
4346 |
|
|
4347 |
/** |
/** |
4623 |
out.writeLine(sb.toString()); |
out.writeLine(sb.toString()); |
4624 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
4625 |
|
|
4626 |
String[] dirS = parseStringList(getSingleLineResultSet().getResult()); |
String[] dirS = parseQuotedStringList(getSingleLineResultSet().getResult()); |
4627 |
|
|
4628 |
DbDirectoryInfo[] infoS = new DbDirectoryInfo[dirS.length]; |
DbDirectoryInfo[] infoS = new DbDirectoryInfo[dirS.length]; |
4629 |
for(int i = 0; i < dirS.length; i++) { |
for(int i = 0; i < dirS.length; i++) { |
4740 |
out.writeLine(sb.toString()); |
out.writeLine(sb.toString()); |
4741 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
4742 |
|
|
4743 |
String[] instrS = parseStringList(getSingleLineResultSet().getResult()); |
String[] instrS = parseQuotedStringList(getSingleLineResultSet().getResult()); |
4744 |
|
|
4745 |
DbInstrumentInfo[] infoS = new DbInstrumentInfo[instrS.length]; |
DbInstrumentInfo[] infoS = new DbInstrumentInfo[instrS.length]; |
4746 |
for(int i = 0; i < instrS.length; i++) { |
for(int i = 0; i < instrS.length; i++) { |