/[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 1775 by iliev, Mon Sep 8 00:19:27 2008 UTC revision 1776 by iliev, Thu Sep 11 18:48:36 2008 UTC
# Line 306  public class CC { Line 306  public class CC {
306                                    
307                  getClient().removeGlobalInfoListener(getHandler());                  getClient().removeGlobalInfoListener(getHandler());
308                  getClient().addGlobalInfoListener(getHandler());                  getClient().addGlobalInfoListener(getHandler());
309                    
310                    getClient().removeChannelMidiDataListener(getHandler());
311                    getClient().addChannelMidiDataListener(getHandler());
312          }          }
313                    
314          /**          /**
# Line 1116  public class CC { Line 1119  public class CC {
1119                  FxSendCountListener, FxSendInfoListener, StreamCountListener, VoiceCountListener,                  FxSendCountListener, FxSendInfoListener, StreamCountListener, VoiceCountListener,
1120                  TotalStreamCountListener, TotalVoiceCountListener, TaskQueueListener,                  TotalStreamCountListener, TotalVoiceCountListener, TaskQueueListener,
1121                  OrchestraListener, ListListener<OrchestraModel>, MidiInstrumentCountListener,                  OrchestraListener, ListListener<OrchestraModel>, MidiInstrumentCountListener,
1122                  MidiInstrumentInfoListener, GlobalInfoListener {                  MidiInstrumentInfoListener, GlobalInfoListener, ChannelMidiDataListener {
1123                                    
1124                  /** Invoked when the number of channels has changed. */                  /** Invoked when the number of channels has changed. */
1125                  public void                  public void
# Line 1333  public class CC { Line 1336  public class CC {
1336                          e.getEntry().removeOrchestraListener(getHandler());                          e.getEntry().removeOrchestraListener(getHandler());
1337                          saveOrchestras();                          saveOrchestras();
1338                  }                  }
1339                    
1340                    /**
1341                     * Invoked when MIDI data arrives.
1342                     */
1343                    public void
1344                    midiDataArrived(final ChannelMidiDataEvent e) {
1345                            try {
1346                                    javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
1347                                            public void
1348                                            run() { fireChannelMidiDataEvent(e); }
1349                                    });
1350                            } catch(Exception x) {
1351                                    CC.getLogger().log(Level.INFO, "Failed!", x);
1352                            }
1353                    }
1354            }
1355            
1356            private static void
1357            fireChannelMidiDataEvent(ChannelMidiDataEvent e) {
1358                    SamplerChannelModel chn;
1359                    chn = CC.getSamplerModel().getChannelById(e.getChannelId());
1360                    if(chn == null) {
1361                            CC.getLogger().info("Unknown channel ID: " + e.getChannelId());
1362                    }
1363                    
1364                    ((DefaultSamplerChannelModel)chn).fireMidiDataEvent(e);
1365          }          }
1366                    
1367          private static final AudioDeviceCountListener audioDeviceCountListener =          private static final AudioDeviceCountListener audioDeviceCountListener =

Legend:
Removed from v.1775  
changed lines
  Added in v.1776

  ViewVC Help
Powered by ViewVC