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

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

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

revision 2287 by iliev, Sun Jul 3 22:01:16 2011 UTC revision 2288 by iliev, Wed Nov 23 21:19:44 2011 UTC
# Line 23  Line 23 
23  package org.jsampler;  package org.jsampler;
24    
25  import java.util.ArrayList;  import java.util.ArrayList;
 import java.util.Vector;  
26    
27  import javax.swing.SwingUtilities;  import net.sf.juife.PDUtils;
28    
29  import org.jsampler.event.AudioDeviceEvent;  import org.jsampler.event.AudioDeviceEvent;
30  import org.jsampler.event.AudioDeviceListener;  import org.jsampler.event.AudioDeviceListener;
# Line 202  public class DefaultAudioDeviceModel imp Line 201  public class DefaultAudioDeviceModel imp
201           * in the send effect chain list or <code>-1</code>           * in the send effect chain list or <code>-1</code>
202           * if there is no send effect chain with ID <code>chainId</code>.           * if there is no send effect chain with ID <code>chainId</code>.
203           */           */
204          public int getSendEffectChainIndex(int chainId) {          @Override
205            public int
206            getSendEffectChainIndex(int chainId) {
207                  for(int i = 0; i < getSendEffectChainCount(); i++) {                  for(int i = 0; i < getSendEffectChainCount(); i++) {
208                          if(getSendEffectChain(i).getChainId() == chainId) return i;                          if(getSendEffectChain(i).getChainId() == chainId) return i;
209                  }                  }
# Line 234  public class DefaultAudioDeviceModel imp Line 235  public class DefaultAudioDeviceModel imp
235                  }                  }
236          }          }
237                    
238            @Override
239          public void          public void
240          removeAllSendEffectChains() {          removeAllSendEffectChains() {
241                  for(int i = effectChains.size() - 1; i >= 0; i--) {                  for(int i = effectChains.size() - 1; i >= 0; i--) {
# Line 285  public class DefaultAudioDeviceModel imp Line 287  public class DefaultAudioDeviceModel imp
287           */           */
288          private void          private void
289          fireSettingsChanged() {          fireSettingsChanged() {
290                  SwingUtilities.invokeLater(new Runnable() {                  PDUtils.runOnUiThread(new Runnable() {
291                          public void                          public void
292                          run() {                          run() {
293                                  AudioDeviceModel model = DefaultAudioDeviceModel.this;                                  AudioDeviceModel model = DefaultAudioDeviceModel.this;
# Line 306  public class DefaultAudioDeviceModel imp Line 308  public class DefaultAudioDeviceModel imp
308                    
309          private void          private void
310          fireSendEffectChainAdded(final EffectChain chain) {          fireSendEffectChainAdded(final EffectChain chain) {
311                  SwingUtilities.invokeLater(new Runnable() {                  PDUtils.runOnUiThread(new Runnable() {
312                          public void                          public void
313                          run() {                          run() {
314                                  AudioDeviceModel m = DefaultAudioDeviceModel.this;                                  AudioDeviceModel m = DefaultAudioDeviceModel.this;
# Line 324  public class DefaultAudioDeviceModel imp Line 326  public class DefaultAudioDeviceModel imp
326                    
327          private void          private void
328          fireSendEffectChainRemoved(final EffectChain chain) {          fireSendEffectChainRemoved(final EffectChain chain) {
329                  SwingUtilities.invokeLater(new Runnable() {                  PDUtils.runOnUiThread(new Runnable() {
330                          public void                          public void
331                          run() {                          run() {
332                                  AudioDeviceModel m = DefaultAudioDeviceModel.this;                                  AudioDeviceModel m = DefaultAudioDeviceModel.this;

Legend:
Removed from v.2287  
changed lines
  Added in v.2288

  ViewVC Help
Powered by ViewVC