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

Diff of /jsampler/trunk/src/org/jsampler/task/UpdateChannels.java

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

revision 1142 by iliev, Mon Aug 7 18:25:58 2006 UTC revision 1143 by iliev, Mon Apr 2 21:18:31 2007 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 Grigor Kirilov Iliev   *   Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 26  import java.util.logging.Level; Line 26  import java.util.logging.Level;
26    
27  import org.jsampler.CC;  import org.jsampler.CC;
28  import org.jsampler.HF;  import org.jsampler.HF;
 import org.jsampler.SamplerModel;  
   
29  import org.jsampler.SamplerChannelModel;  import org.jsampler.SamplerChannelModel;
30    import org.jsampler.SamplerModel;
31    
32  import static org.jsampler.JSI18n.i18n;  import static org.jsampler.JSI18n.i18n;
33    
34    
35  /**  /**
36   * This task updates the sampler channel list and all asampler channels' settings.   * This task updates the sampler channel list.
37   * @author Grigor Iliev   * @author Grigor Iliev
38   */   */
39  public class UpdateChannels extends EnhancedTask {  public class UpdateChannels extends EnhancedTask {
# Line 56  public class UpdateChannels extends Enha Line 55  public class UpdateChannels extends Enha
55                                                                    
56                          for(SamplerChannelModel m : sm.getChannelModels()) {                          for(SamplerChannelModel m : sm.getChannelModels()) {
57                                  for(int i = 0; i < chnIDs.length; i++) {                                  for(int i = 0; i < chnIDs.length; i++) {
58                                          if(m.getChannelID() == chnIDs[i]) {                                          if(m.getChannelId() == chnIDs[i]) {
59                                                  chnIDs[i] = -1;                                                  chnIDs[i] = -1;
60                                                  found = true;                                                  found = true;
61                                          }                                          }
62                                  }                                  }
63                                                                    
64                                  if(!found) sm.removeChannel(m.getChannelID());                                  if(!found) sm.removeChannel(m.getChannelId());
65                                  found = false;                                  found = false;
66                          }                          }
67                                                    

Legend:
Removed from v.1142  
changed lines
  Added in v.1143

  ViewVC Help
Powered by ViewVC