129 |
public void |
public void |
130 |
run() { |
run() { |
131 |
try { |
try { |
|
// TODO: move this to jlscp |
|
|
java.util.Vector<Parameter> v = new java.util.Vector<Parameter>(); |
|
|
for(Parameter p : parameters) { |
|
|
if(p.getValue() != null) v.add(p); |
|
|
} |
|
|
parameters = v.toArray(new Parameter[v.size()]); |
|
|
/////// |
|
|
|
|
132 |
Integer deviceId = |
Integer deviceId = |
133 |
CC.getClient().createAudioOutputDevice(driver, parameters); |
CC.getClient().createAudioOutputDevice(driver, parameters); |
134 |
setResult(deviceId); |
setResult(deviceId); |
207 |
} |
} |
208 |
|
|
209 |
/** |
/** |
210 |
|
* This task alters a specific setting of an audio output device. |
211 |
|
*/ |
212 |
|
public static class SetDeviceParameter extends EnhancedTask { |
213 |
|
private int dev; |
214 |
|
private Parameter prm; |
215 |
|
|
216 |
|
/** |
217 |
|
* Creates new instance of <code>SetDeviceParameter</code>. |
218 |
|
* @param dev The id of the device whose parameter should be set. |
219 |
|
* @param prm The parameter to be set. |
220 |
|
*/ |
221 |
|
public |
222 |
|
SetDeviceParameter(int dev, Parameter prm) { |
223 |
|
setTitle("Audio.SetDeviceParameter_task"); |
224 |
|
setDescription(i18n.getMessage("Audio.SetDeviceParameter.desc", dev)); |
225 |
|
|
226 |
|
this.dev = dev; |
227 |
|
this.prm = prm; |
228 |
|
} |
229 |
|
|
230 |
|
/** The entry point of the task. */ |
231 |
|
public void |
232 |
|
run() { |
233 |
|
try { CC.getClient().setAudioOutputDeviceParameter(dev, prm); } |
234 |
|
catch(Exception x) { |
235 |
|
setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x)); |
236 |
|
CC.getLogger().log(Level.FINE, getErrorMessage(), x); |
237 |
|
} |
238 |
|
} |
239 |
|
} |
240 |
|
|
241 |
|
/** |
242 |
* This task alters a specific setting of an audio output channel. |
* This task alters a specific setting of an audio output channel. |
243 |
*/ |
*/ |
244 |
public static class SetChannelParameter extends EnhancedTask { |
public static class SetChannelParameter extends EnhancedTask { |
248 |
|
|
249 |
/** |
/** |
250 |
* Creates new instance of <code>SetChannelParameter</code>. |
* Creates new instance of <code>SetChannelParameter</code>. |
251 |
* @param dev The id of the device whose port parameter should be set. |
* @param dev The id of the device whose channel parameter should be set. |
252 |
* @param channel The channel number. |
* @param channel The channel number. |
253 |
* @param prm The parameter to be set. |
* @param prm The parameter to be set. |
254 |
*/ |
*/ |