4250 |
|
|
4251 |
/** |
/** |
4252 |
* Gets the current list of effect instances. |
* Gets the current list of effect instances. |
4253 |
* @return An <code>EffectInstance</code> array |
* @return An <code>EffectInstanceInfo</code> array |
4254 |
* providing the current list of effect instances. |
* providing the current list of effect instances. |
4255 |
* @throws IOException If some I/O error occurs. |
* @throws IOException If some I/O error occurs. |
4256 |
* @throws LscpException If LSCP protocol corruption occurs. |
* @throws LscpException If LSCP protocol corruption occurs. |
4257 |
*/ |
*/ |
4258 |
public synchronized EffectInstance[] |
public synchronized EffectInstanceInfo[] |
4259 |
getEffectInstances() throws IOException, LscpException, LSException { |
getEffectInstances() throws IOException, LscpException, LSException { |
4260 |
Integer[] idS = getEffectInscanceIDs(); |
Integer[] idS = getEffectInscanceIDs(); |
4261 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
4262 |
|
|
4263 |
EffectInstance[] eis = new EffectInstance[idS.length]; |
EffectInstanceInfo[] eis = new EffectInstanceInfo[idS.length]; |
4264 |
|
|
4265 |
for(int i = 0; i < eis.length; i++) |
for(int i = 0; i < eis.length; i++) |
4266 |
eis[i] = getEffectInstanceInfo(idS[i]); |
eis[i] = getEffectInstanceInfo(idS[i]); |
4282 |
/** |
/** |
4283 |
* Gets the current informations about the specified effect instance. |
* Gets the current informations about the specified effect instance. |
4284 |
* @param id The numerical ID of the effect instance. |
* @param id The numerical ID of the effect instance. |
4285 |
* @return <code>EffectInstance</code> object containing |
* @return <code>EffectInstanceInfo</code> object containing |
4286 |
* the current informations about the specified effect instance. |
* the current informations about the specified effect instance. |
4287 |
* @throws IOException If an I/O error occurs. |
* @throws IOException If an I/O error occurs. |
4288 |
* @throws LscpException If LSCP protocol corruption occurs. |
* @throws LscpException If LSCP protocol corruption occurs. |
4289 |
* @throws LSException If the effect instance ID is invalid. |
* @throws LSException If the effect instance ID is invalid. |
4290 |
*/ |
*/ |
4291 |
public synchronized EffectInstance |
public synchronized EffectInstanceInfo |
4292 |
getEffectInstanceInfo(int id) throws IOException, LscpException, LSException { |
getEffectInstanceInfo(int id) throws IOException, LscpException, LSException { |
4293 |
EffectInstance ei = new EffectInstance(); |
EffectInstanceInfo ei = new EffectInstanceInfo(); |
4294 |
if(!retrieveInfo("GET EFFECT_INSTANCE INFO " + id, ei)) return null; |
if(!retrieveInfo("GET EFFECT_INSTANCE INFO " + id, ei)) return null; |
4295 |
ei.setInstanceId(id); |
ei.setInstanceId(id); |
4296 |
|
|
4317 |
getEffectInstanceParameterInfo(int instanceId, int parameter) |
getEffectInstanceParameterInfo(int instanceId, int parameter) |
4318 |
throws IOException, LscpException, LSException |
throws IOException, LscpException, LSException |
4319 |
{ |
{ |
4320 |
EffectParameter prm = new EffectParameter(); |
EffectParameter prm = new EffectParameter(instanceId, parameter); |
4321 |
String s = String.valueOf(instanceId) + " " + String.valueOf(parameter); |
String s = String.valueOf(instanceId) + " " + String.valueOf(parameter); |
4322 |
if(!retrieveInfo("GET EFFECT_INSTANCE_INPUT_CONTROL INFO " + s, prm)) return null; |
if(!retrieveInfo("GET EFFECT_INSTANCE_INPUT_CONTROL INFO " + s, prm)) return null; |
4323 |
|
|
4363 |
/** |
/** |
4364 |
* Gets the current list of send effect chains on the specified audio output device. |
* Gets the current list of send effect chains on the specified audio output device. |
4365 |
* @param audioDeviceId The numerical ID of the audio output device. |
* @param audioDeviceId The numerical ID of the audio output device. |
4366 |
* @return An <code>EffectInstance</code> array |
* @return An <code>EffectInstanceInfo</code> array |
4367 |
* providing the current list of effect instances. |
* providing the current list of effect instances. |
4368 |
* @throws IOException If some I/O error occurs. |
* @throws IOException If some I/O error occurs. |
4369 |
* @throws LscpException If LSCP protocol corruption occurs. |
* @throws LscpException If LSCP protocol corruption occurs. |
4370 |
*/ |
*/ |
4371 |
public synchronized EffectChain[] |
public synchronized EffectChainInfo[] |
4372 |
getSendEffectChains(int audioDeviceId) throws IOException, LscpException, LSException { |
getSendEffectChains(int audioDeviceId) throws IOException, LscpException, LSException { |
4373 |
Integer[] idS = getSendEffectChainIDs(audioDeviceId); |
Integer[] idS = getSendEffectChainIDs(audioDeviceId); |
4374 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
4375 |
|
|
4376 |
EffectChain[] ecs = new EffectChain[idS.length]; |
EffectChainInfo[] ecs = new EffectChainInfo[idS.length]; |
4377 |
|
|
4378 |
for(int i = 0; i < ecs.length; i++) { |
for(int i = 0; i < ecs.length; i++) { |
4379 |
ecs[i] = getSendEffectChainInfo(audioDeviceId, idS[i]); |
ecs[i] = getSendEffectChainInfo(audioDeviceId, idS[i]); |
4426 |
* Gets the current information of a send effect chain. |
* Gets the current information of a send effect chain. |
4427 |
* @param audioDeviceId The numerical ID of the audio output device. |
* @param audioDeviceId The numerical ID of the audio output device. |
4428 |
* @param chainId The numerical ID of the send effect chain. |
* @param chainId The numerical ID of the send effect chain. |
4429 |
* @return <code>EffectChain</code> object containing |
* @return <code>EffectChainInfo</code> object containing |
4430 |
* the current informations about the specified effect chain. |
* the current informations about the specified effect chain. |
4431 |
* @throws IOException If an I/O error occurs. |
* @throws IOException If an I/O error occurs. |
4432 |
* @throws LscpException If LSCP protocol corruption occurs. |
* @throws LscpException If LSCP protocol corruption occurs. |
4433 |
* @throws LSException If the audio device ID or the effect chain ID is invalid. |
* @throws LSException If the audio device ID or the effect chain ID is invalid. |
4434 |
*/ |
*/ |
4435 |
public synchronized EffectChain |
public synchronized EffectChainInfo |
4436 |
getSendEffectChainInfo(int audioDeviceId, int chainId) |
getSendEffectChainInfo(int audioDeviceId, int chainId) |
4437 |
throws IOException, LscpException, LSException |
throws IOException, LscpException, LSException |
4438 |
{ |
{ |
4442 |
if(getPrintOnlyMode()) return null; |
if(getPrintOnlyMode()) return null; |
4443 |
|
|
4444 |
ResultSet rs = getMultiLineResultSet(); |
ResultSet rs = getMultiLineResultSet(); |
4445 |
EffectChain chain = null; |
EffectChainInfo chain = null; |
4446 |
|
|
4447 |
for(String s : rs.getMultiLineResult()) { |
for(String s : rs.getMultiLineResult()) { |
4448 |
if(s.startsWith("EFFECT_SEQUENCE: ")) { |
if(s.startsWith("EFFECT_SEQUENCE: ")) { |
4449 |
s = s.substring("EFFECT_SEQUENCE: ".length()); |
s = s.substring("EFFECT_SEQUENCE: ".length()); |
4450 |
Integer[] eis = parseIntList(s); |
Integer[] eis = parseIntList(s); |
4451 |
EffectInstance[] instances = new EffectInstance[eis.length]; |
EffectInstanceInfo[] instances = new EffectInstanceInfo[eis.length]; |
4452 |
for(int i = 0; i < eis.length; i++) { |
for(int i = 0; i < eis.length; i++) { |
4453 |
instances[i] = getEffectInstanceInfo(eis[i]); |
instances[i] = getEffectInstanceInfo(eis[i]); |
4454 |
} |
} |
4455 |
chain = new EffectChain(instances); |
chain = new EffectChainInfo(instances); |
4456 |
chain.setChainId(chainId); |
chain.setChainId(chainId); |
4457 |
} |
} |
4458 |
} |
} |