/[svn]/jsampler/trunk/src/org/jsampler/CC.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/CC.java

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

revision 1818 by iliev, Wed Dec 24 17:29:47 2008 UTC revision 1867 by iliev, Mon Mar 16 22:12:32 2009 UTC
# Line 1  Line 1 
1  /*  /*
2   *   JSampler - a java front-end for LinuxSampler   *   JSampler - a java front-end for LinuxSampler
3   *   *
4   *   Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2009 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 772  public class CC { Line 772  public class CC {
772                          }                          }
773                  });                  });
774                                    
775                  final GetEngines ge = new GetEngines();                  final Global.GetEngines ge = new Global.GetEngines();
776                  ge.addTaskListener(new TaskListener() {                  ge.addTaskListener(new TaskListener() {
777                          public void                          public void
778                          taskPerformed(TaskEvent e) {                          taskPerformed(TaskEvent e) {
# Line 830  public class CC { Line 830  public class CC {
830                  });                  });
831                                    
832                                    
833                  final Connect cnt = new Connect();                  final Global.Connect cnt = new Global.Connect();
834                  boolean b = preferences().getBoolProperty(JSPrefs.LAUNCH_BACKEND_LOCALLY);                  boolean b = preferences().getBoolProperty(JSPrefs.LAUNCH_BACKEND_LOCALLY);
835                  if(b && srv.isLocal() && backendProcess == null) cnt.setSilent(true);                  if(b && srv.isLocal() && backendProcess == null) cnt.setSilent(true);
836                  cnt.addTaskListener(new TaskListener() {                  cnt.addTaskListener(new TaskListener() {
# Line 1223  public class CC { Line 1223  public class CC {
1223                          for(int i = 0; i < fxSends.length; i++) {                          for(int i = 0; i < fxSends.length; i++) {
1224                                  FxSend f = fxSends[i];                                  FxSend f = fxSends[i];
1225                                  lscpClient.createFxSend(chnId, f.getMidiController(), f.getName());                                  lscpClient.createFxSend(chnId, f.getMidiController(), f.getName());
1226                                    lscpClient.setFxSendLevel(chnId, i, f.getLevel());
1227                                                                    
1228                                  Integer[] r = f.getAudioOutputRouting();                                  Integer[] r = f.getAudioOutputRouting();
1229                                  for(int j = 0; j < r.length; j++) {                                  for(int j = 0; j < r.length; j++) {
# Line 1256  public class CC { Line 1257  public class CC {
1257                                    
1258                  return true;                  return true;
1259          }          }
1260    
1261            public static boolean
1262            isMacOS() {
1263                    return System.getProperty("os.name").toLowerCase().startsWith("mac os x");
1264            }
1265                    
1266                    
1267          private final static EventHandler eventHandler = new EventHandler();          private final static EventHandler eventHandler = new EventHandler();
# Line 1396  public class CC { Line 1402  public class CC {
1402                  @Override                  @Override
1403                  public void                  public void
1404                  totalVoiceCountChanged(TotalVoiceCountEvent e) {                  totalVoiceCountChanged(TotalVoiceCountEvent e) {
1405                          scheduleTask(new UpdateTotalVoiceCount());                          scheduleTask(new Global.UpdateTotalVoiceCount());
1406                  }                  }
1407                                    
1408                  /** Invoked when the number of MIDI instruments in a MIDI instrument map is changed. */                  /** Invoked when the number of MIDI instruments in a MIDI instrument map is changed. */
# Line 1447  public class CC { Line 1453  public class CC {
1453                                  break;                                  break;
1454                          case TASK_DONE:                          case TASK_DONE:
1455                                  EnhancedTask t = (EnhancedTask)e.getSource();                                  EnhancedTask t = (EnhancedTask)e.getSource();
1456                                  if(t.doneWithErrors() && !t.isStopped() && !t.isSilent()) {                                  if(t.doneWithErrors() && !t.isSilent()) {
1457                                          showError(t);                                          if(t.getErrorCode() == t.SOCKET_ERROR) {
1458                                                    getMainFrame().handleConnectionFailure();
1459                                            } else if(!t.isStopped()) {
1460                                                    showError(t);
1461                                            }
1462                                  }                                  }
1463                                  break;                                  break;
1464                          case NOT_IDLE:                          case NOT_IDLE:

Legend:
Removed from v.1818  
changed lines
  Added in v.1867

  ViewVC Help
Powered by ViewVC