--- jsampler/trunk/src/org/jsampler/task/Midi.java 2007/09/07 11:03:52 1326 +++ jsampler/trunk/src/org/jsampler/task/Midi.java 2007/09/07 12:09:59 1327 @@ -75,6 +75,42 @@ } } } + + /** + * This task retrieves detailed information about all parameters + * of the specified MIDI input driver. + */ + public static class GetDriverParametersInfo extends EnhancedTask { + private String driver; + Parameter[] depList; + + /** + * Creates a new instance of GetDriverParametersInfo. + * @param depList - A dependences list. + */ + public + GetDriverParametersInfo(String driver, Parameter... depList) { + setTitle("Midi.GetDriverParametersInfo_task"); + setDescription(i18n.getMessage("Midi.GetDriverParametersInfo.desc")); + + this.driver = driver; + this.depList = depList; + } + + /** The entry point of the task. */ + public void + run() { + try { + MidiInputDriver d; + d = CC.getClient().getMidiInputDriverInfo(driver, depList); + setResult(d.getParameters()); + } + catch(Exception x) { + setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x)); + CC.getLogger().log(Level.FINE, getErrorMessage(), x); + } + } + } /** * This task creates a new MIDI input device.