/[svn]/jlscp/trunk/src/org/linuxsampler/lscp/Client.java
ViewVC logotype

Diff of /jlscp/trunk/src/org/linuxsampler/lscp/Client.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2190 by iliev, Fri Jun 24 20:18:03 2011 UTC revision 2194 by iliev, Tue Jun 28 22:08:23 2011 UTC
# Line 4250  public class Client { Line 4250  public class Client {
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]);
# Line 4282  public class Client { Line 4282  public class Client {
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    
# Line 4317  public class Client { Line 4317  public class Client {
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    
# Line 4363  public class Client { Line 4363  public class Client {
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]);
# Line 4426  public class Client { Line 4426  public class Client {
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          {          {
# Line 4442  public class Client { Line 4442  public class Client {
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                  }                  }

Legend:
Removed from v.2190  
changed lines
  Added in v.2194

  ViewVC Help
Powered by ViewVC