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

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

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

revision 1203 by iliev, Mon Apr 2 21:39:15 2007 UTC revision 1204 by iliev, Thu May 24 21:43:45 2007 UTC
# Line 162  public class Audio { Line 162  public class Audio {
162                                  CC.getClient().enableAudioOutputDevice(dev, enable);                                  CC.getClient().enableAudioOutputDevice(dev, enable);
163                                                    
164                                  // Not needed, but eventually speeds up the change.                                  // Not needed, but eventually speeds up the change.
165                                  CC.getSamplerModel().getAudioDeviceModel(dev).setActive(enable);                                  CC.getSamplerModel().getAudioDeviceById(dev).setActive(enable);
166                          } catch(Exception x) {                          } catch(Exception x) {
167                                  setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x));                                  setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x));
168                                  CC.getLogger().log(Level.FINE, getErrorMessage(), x);                                  CC.getLogger().log(Level.FINE, getErrorMessage(), x);
# Line 261  public class Audio { Line 261  public class Audio {
261                  run() {                  run() {
262                          try {                          try {
263                                  AudioOutputDevice d = CC.getClient().getAudioOutputDeviceInfo(dev);                                  AudioOutputDevice d = CC.getClient().getAudioOutputDeviceInfo(dev);
264                                  CC.getSamplerModel().getAudioDeviceModel(dev).setDeviceInfo(d);                                  CC.getSamplerModel().getAudioDeviceById(dev).setDeviceInfo(d);
265                          } catch(Exception x) {                          } catch(Exception x) {
266                                  setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x));                                  setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x));
267                                  CC.getLogger().log(Level.FINE, getErrorMessage(), x);                                  CC.getLogger().log(Level.FINE, getErrorMessage(), x);
# Line 289  public class Audio { Line 289  public class Audio {
289                                                    
290                                  boolean found = false;                                  boolean found = false;
291                                                                    
292                                  for(AudioDeviceModel m : sm.getAudioDeviceModels()) {                                  for(AudioDeviceModel m : sm.getAudioDevices()) {
293                                          for(int i = 0; i < devIDs.length; i++) {                                          for(int i = 0; i < devIDs.length; i++) {
294                                                  if(m.getDeviceId() == devIDs[i]) {                                                  if(m.getDeviceId() == devIDs[i]) {
295                                                          devIDs[i] = -1;                                                          devIDs[i] = -1;
# Line 297  public class Audio { Line 297  public class Audio {
297                                                  }                                                  }
298                                          }                                          }
299                                                                    
300                                          if(!found) sm.removeAudioDevice(m.getDeviceId());                                          if(!found) sm.removeAudioDeviceById(m.getDeviceId());
301                                          found = false;                                          found = false;
302                                  }                                  }
303                                                    

Legend:
Removed from v.1203  
changed lines
  Added in v.1204

  ViewVC Help
Powered by ViewVC