/[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 1354 by iliev, Mon Sep 17 23:33:50 2007 UTC revision 1421 by iliev, Sun Oct 14 18:08:45 2007 UTC
# Line 2460  public class Client { Line 2460  public class Client {
2460          public synchronized int          public synchronized int
2461          addMidiInstrumentMap(String name) throws IOException, LSException, LscpException {          addMidiInstrumentMap(String name) throws IOException, LSException, LscpException {
2462                  verifyConnection();                  verifyConnection();
2463                  out.writeLine("ADD MIDI_INSTRUMENT_MAP '" + name + "'");                  out.writeLine("ADD MIDI_INSTRUMENT_MAP '" + toEscapedString(name) + "'");
2464                  if(getPrintOnlyMode()) return -1;                  if(getPrintOnlyMode()) return -1;
2465                                    
2466                  ResultSet rs = getEmptyResultSet();                  ResultSet rs = getEmptyResultSet();
# Line 2563  public class Client { Line 2563  public class Client {
2563                                    
2564                  for(String s : lnS) {                  for(String s : lnS) {
2565                          if(s.startsWith("NAME: ")) {                          if(s.startsWith("NAME: ")) {
2566                                  name = s.substring("NAME: ".length());                                  name = toNonEscapedString(s.substring("NAME: ".length()));
2567                          } else if(s.startsWith("DEFAULT: ")) {                          } else if(s.startsWith("DEFAULT: ")) {
2568                                  b = Boolean.parseBoolean(s.substring("DEFAULT: ".length()));                                  b = Boolean.parseBoolean(s.substring("DEFAULT: ".length()));
2569                          } else {                          } else {
# Line 2611  public class Client { Line 2611  public class Client {
2611                                  throws IOException, LscpException, LSException {                                  throws IOException, LscpException, LSException {
2612                                    
2613                  verifyConnection();                  verifyConnection();
2614                    name = toEscapedString(name);
2615                  out.writeLine("SET MIDI_INSTRUMENT_MAP NAME " +  + mapId + " '" + name + "'");                  out.writeLine("SET MIDI_INSTRUMENT_MAP NAME " +  + mapId + " '" + name + "'");
2616                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
2617                                    
# Line 2666  public class Client { Line 2667  public class Client {
2667                  if(!info.getLoadMode().name().equals("DEFAULT")) {                  if(!info.getLoadMode().name().equals("DEFAULT")) {
2668                          cmd.append(' ').append(info.getLoadMode().name());                          cmd.append(' ').append(info.getLoadMode().name());
2669                  }                  }
2670                  if(info.getName() != null) cmd.append(" '").append(info.getName()).append("'");                  
2671                    if(info.getName() != null) {
2672                            String s = toEscapedString(info.getName());
2673                            cmd.append(" '").append(s).append("'");
2674                    }
2675                                    
2676                  out.writeLine(cmd.toString());                  out.writeLine(cmd.toString());
2677                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
# Line 3044  public class Client { Line 3049  public class Client {
3049                  out.writeLine("LIST AVAILABLE_ENGINES");                  out.writeLine("LIST AVAILABLE_ENGINES");
3050                  if(getPrintOnlyMode()) return null;                  if(getPrintOnlyMode()) return null;
3051                                    
3052                  return parseQuotedStringList(getSingleLineResultSet().getResult());                  return parseStringList(getSingleLineResultSet().getResult());
3053          }          }
3054                    
3055          /**          /**
# Line 3515  public class Client { Line 3520  public class Client {
3520                                    
3521                  verifyConnection();                  verifyConnection();
3522                  String s = String.valueOf(channel) + " " + String.valueOf(midiCtrl);                  String s = String.valueOf(channel) + " " + String.valueOf(midiCtrl);
3523                  if(name != null) s += " '" + name + "'";                  if(name != null) s += " '" + toEscapedString(name) + "'";
3524                  out.writeLine("CREATE FX_SEND " + s);                  out.writeLine("CREATE FX_SEND " + s);
3525                  if(getPrintOnlyMode()) return -1;                  if(getPrintOnlyMode()) return -1;
3526                                    
# Line 3646  public class Client { Line 3651  public class Client {
3651                                  throws IOException, LscpException, LSException {                                  throws IOException, LscpException, LSException {
3652                                    
3653                  verifyConnection();                  verifyConnection();
3654                  String args = " " + channel + " " + fxSend + " '" + name + "'";                  String args = " " + channel + " " + fxSend + " '" + toEscapedString(name) + "'";
3655                  out.writeLine("SET FX_SEND NAME" + args);                  out.writeLine("SET FX_SEND NAME" + args);
3656                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
3657                                    
# Line 3745  public class Client { Line 3750  public class Client {
3750           * @see #getSamplerChannels           * @see #getSamplerChannels
3751           */           */
3752          public synchronized void          public synchronized void
3753          editInstrument(int samplerChn) throws IOException, LscpException, LSException {          editChannelInstrument(int samplerChn) throws IOException, LscpException, LSException {
3754                  verifyConnection();                  verifyConnection();
3755                  out.writeLine("EDIT INSTRUMENT " + samplerChn);                  out.writeLine("EDIT CHANNEL INSTRUMENT " + samplerChn);
3756                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
3757                                    
3758                  ResultSet rs = getEmptyResultSet();                  ResultSet rs = getEmptyResultSet();

Legend:
Removed from v.1354  
changed lines
  Added in v.1421

  ViewVC Help
Powered by ViewVC