/[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 1688 by iliev, Thu Feb 14 16:52:36 2008 UTC revision 1729 by iliev, Tue Apr 29 22:22:40 2008 UTC
# Line 136  public class CC { Line 136  public class CC {
136          scheduleTask(Task t) {          scheduleTask(Task t) {
137                  while(getTaskQueue().removeTask(t)) { }                  while(getTaskQueue().removeTask(t)) { }
138                                    
                 if(getTaskQueue().getPendingTaskCount() == 0) {  
                         if(t.equals(getTaskQueue().getRunningTask())) return;  
                 }  
                   
139                  getTaskQueue().add(t);                  getTaskQueue().add(t);
140          }          }
141                    
# Line 404  public class CC { Line 400  public class CC {
400           */           */
401          public static InstrumentsDbTreeModel          public static InstrumentsDbTreeModel
402          getInstrumentsDbTreeModel() {          getInstrumentsDbTreeModel() {
403                    if(CC.getSamplerModel().getServerInfo() == null) return null;
404                  if(!CC.getSamplerModel().getServerInfo().hasInstrumentsDbSupport()) return null;                  if(!CC.getSamplerModel().getServerInfo().hasInstrumentsDbSupport()) return null;
405                                    
406                  if(instrumentsDbTreeModel == null) {                  if(instrumentsDbTreeModel == null) {
# Line 424  public class CC { Line 421  public class CC {
421                  idtmListeners.remove(l);                  idtmListeners.remove(l);
422          }          }
423                    
424            private static final LostFilesModel lostFilesModel = new LostFilesModel();
425            
426            public static LostFilesModel
427            getLostFilesModel() { return lostFilesModel; }
428            
429          /**          /**
430           * Loads the orchestras described in <code>&lt;jsampler_home&gt;/orchestras.xml</code>.           * Loads the orchestras described in <code>&lt;jsampler_home&gt;/orchestras.xml</code>.
431           * If file with name <code>orchestras.xml.bkp</code> exist in the JSampler's home           * If file with name <code>orchestras.xml.bkp</code> exist in the JSampler's home
# Line 913  public class CC { Line 915  public class CC {
915                          sb.append("\r\n");                          sb.append("\r\n");
916                  }                  }
917                                    
918                    exportInstrMapsToLscpScript(lscpClient);
919                    sb.append(out.toString());
920                    out.reset();
921                    sb.append("\r\n");
922                    
923                  SamplerChannelModel[] channels = getSamplerModel().getChannels();                  SamplerChannelModel[] channels = getSamplerModel().getChannels();
924                                    
925                  for(int i = 0; i < channels.length; i++) {                  for(int i = 0; i < channels.length; i++) {
# Line 930  public class CC { Line 937  public class CC {
937                          sb.append("\r\n");                          sb.append("\r\n");
938                  }                  }
939                                    
                 exportInstrMapsToLscpScript(lscpClient);  
                 sb.append(out.toString());  
                 out.reset();  
                   
940                  return sb.toString();                  return sb.toString();
941          }          }
942                    
# Line 1000  public class CC { Line 1003  public class CC {
1003                          if(chn.getEngine() != null) {                          if(chn.getEngine() != null) {
1004                                  lscpCLient.loadSamplerEngine(chn.getEngine().getName(), chnId);                                  lscpCLient.loadSamplerEngine(chn.getEngine().getName(), chnId);
1005                                  lscpCLient.setChannelVolume(chnId, chn.getVolume());                                  lscpCLient.setChannelVolume(chnId, chn.getVolume());
1006                                    int mapId = chn.getMidiInstrumentMapId();
1007                                    lscpCLient.setChannelMidiInstrumentMap(chnId, mapId);
1008                          }                          }
1009                                                    
1010                          id = chn.getAudioOutputDevice();                          id = chn.getAudioOutputDevice();
# Line 1203  public class CC { Line 1208  public class CC {
1208                  /** 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. */
1209                  public void                  public void
1210                  instrumentCountChanged(MidiInstrumentCountEvent e) {                  instrumentCountChanged(MidiInstrumentCountEvent e) {
1211                          getTaskQueue().add(new Midi.UpdateInstruments(e.getMapId()));                          scheduleTask(new Midi.UpdateInstruments(e.getMapId()));
1212                  }                  }
1213                                    
1214                  /** Invoked when a MIDI instrument in a MIDI instrument map is changed. */                  /** Invoked when a MIDI instrument in a MIDI instrument map is changed. */

Legend:
Removed from v.1688  
changed lines
  Added in v.1729

  ViewVC Help
Powered by ViewVC