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

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

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

revision 1687 by iliev, Thu Dec 6 19:37:41 2007 UTC revision 1688 by iliev, Thu Feb 14 16:52:36 2008 UTC
# Line 895  public class DefaultSamplerModel impleme Line 895  public class DefaultSamplerModel impleme
895          public void          public void
896          setModified(boolean b) { modified = b; }          setModified(boolean b) { modified = b; }
897                    
898            /** Resets the model. */
899            public void
900            reset() {
901                    removeAllMidiInstrumentMaps();
902                    
903                    for(int i = channelModels.size() - 1; i >= 0; i--) {
904                            SamplerChannelModel m = channelModels.get(i);
905                            channelModels.remove(i);
906                            fireSamplerChannelRemoved(m);
907                    }
908                    
909                    for(int i = midiDeviceModels.size() - 1; i >= 0; i--) {
910                            MidiDeviceModel m = midiDeviceModels.get(i);
911                            midiDeviceModels.remove(i);
912                            fireMidiDeviceRemoved(m);
913                    }
914                    
915                    for(int i = audioDeviceModels.size() - 1; i >= 0; i--) {
916                            AudioDeviceModel m = audioDeviceModels.get(i);
917                            audioDeviceModels.remove(i);
918                            fireAudioDeviceRemoved(m);
919                    }
920                    
921                    setServerInfo(null);
922                    setAudioOutputDrivers(null);
923                    setMidiInputDrivers(null);
924                    setEngines(null);
925                    
926                    setVolume(0);
927                    setModified(false);
928                    
929                    totalStreamCount = 0;
930                    totalVoiceCount = 0;
931                    totalVoiceCountMax = 0;
932                    
933                    fireTotalStreamCountChanged();
934                    fireTotalVoiceCountChanged();
935                    fireDefaultMapChanged();
936            }
937            
938          /**          /**
939           * Notifies listeners that a sampler channel has been added.           * Notifies listeners that a sampler channel has been added.
940           * This method can be invoked outside the event-dispatching thread.           * This method can be invoked outside the event-dispatching thread.

Legend:
Removed from v.1687  
changed lines
  Added in v.1688

  ViewVC Help
Powered by ViewVC