/[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 1733 by iliev, Tue Apr 29 22:22:40 2008 UTC revision 1734 by iliev, Sun May 4 18:40:13 2008 UTC
# Line 140  public class CC { Line 140  public class CC {
140          }          }
141                    
142          /**          /**
143             * Adds the specified task to the task queue only if the last
144             * task in the is not equal to <code>t</code>.
145             */
146            public static void
147            addTask(Task t) {
148                    Task[] tasks = getTaskQueue().getPendingTasks();
149                    if(tasks.length > 0 && tasks[tasks.length - 1].equals(t)) return;
150                    getTaskQueue().add(t);
151            }
152            
153            /**
154           * Gets the configuration of the current view.           * Gets the configuration of the current view.
155           */           */
156          public static JSViewConfig          public static JSViewConfig
# Line 784  public class CC { Line 795  public class CC {
795                                  getTaskQueue().add(mgim);                                  getTaskQueue().add(mgim);
796                                  getTaskQueue().add(new Midi.UpdateDevices());                                  getTaskQueue().add(new Midi.UpdateDevices());
797                                  getTaskQueue().add(new Audio.UpdateDevices());                                  getTaskQueue().add(new Audio.UpdateDevices());
798                                  getTaskQueue().add(uc);                                  addTask(uc);
799                          }                          }
800                  });                  });
801                                    
# Line 1094  public class CC { Line 1105  public class CC {
1105                  /** Invoked when the number of channels has changed. */                  /** Invoked when the number of channels has changed. */
1106                  public void                  public void
1107                  channelCountChanged( ChannelCountEvent e) {                  channelCountChanged( ChannelCountEvent e) {
1108                          getTaskQueue().add(new UpdateChannels());                          addTask(new UpdateChannels());
1109                  }                  }
1110                                    
1111                  /** Invoked when changes to the sampler channel has occured. */                  /** Invoked when changes to the sampler channel has occured. */

Legend:
Removed from v.1733  
changed lines
  Added in v.1734

  ViewVC Help
Powered by ViewVC