/[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 1203 by iliev, Mon Apr 2 21:18:31 2007 UTC revision 1204 by iliev, Thu May 24 21:43:45 2007 UTC
# Line 216  public class DefaultSamplerModel impleme Line 216  public class DefaultSamplerModel impleme
216           * if there is no audio device with ID <code>deviceId</code>.           * if there is no audio device with ID <code>deviceId</code>.
217           */           */
218          public AudioDeviceModel          public AudioDeviceModel
219          getAudioDeviceModel(int deviceId) {          getAudioDeviceById(int deviceId) {
220                  for(AudioDeviceModel m : audioDeviceModels)                  for(AudioDeviceModel m : audioDeviceModels)
221                          if(m.getDeviceId() == deviceId) return m;                          if(m.getDeviceId() == deviceId) return m;
222                                    
# Line 235  public class DefaultSamplerModel impleme Line 235  public class DefaultSamplerModel impleme
235           * @return The current list of audio device models.           * @return The current list of audio device models.
236           */           */
237          public AudioDeviceModel[]          public AudioDeviceModel[]
238          getAudioDeviceModels() {          getAudioDevices() {
239                  return audioDeviceModels.toArray(new AudioDeviceModel[audioDeviceModels.size()]);                  return audioDeviceModels.toArray(new AudioDeviceModel[audioDeviceModels.size()]);
240          }          }
241                    
# Line 257  public class DefaultSamplerModel impleme Line 257  public class DefaultSamplerModel impleme
257           * if the device list does not contain audio device with ID <code>deviceId</code>.           * if the device list does not contain audio device with ID <code>deviceId</code>.
258           */           */
259          public boolean          public boolean
260          removeAudioDevice(int deviceId) {          removeAudioDeviceById(int deviceId) {
261                  for(int i = 0; i < audioDeviceModels.size(); i++) {                  for(int i = 0; i < audioDeviceModels.size(); i++) {
262                          AudioDeviceModel m = audioDeviceModels.get(i);                          AudioDeviceModel m = audioDeviceModels.get(i);
263                          if(m.getDeviceId() == deviceId) {                          if(m.getDeviceId() == deviceId) {
# Line 304  public class DefaultSamplerModel impleme Line 304  public class DefaultSamplerModel impleme
304           * if there is no MIDI device with ID <code>deviceId</code>.           * if there is no MIDI device with ID <code>deviceId</code>.
305           */           */
306          public MidiDeviceModel          public MidiDeviceModel
307          getMidiDeviceModel(int deviceId) {          getMidiDeviceById(int deviceId) {
308                  for(MidiDeviceModel m : midiDeviceModels)                  for(MidiDeviceModel m : midiDeviceModels)
309                          if(m.getDeviceId() == deviceId) return m;                          if(m.getDeviceId() == deviceId) return m;
310                                    
# Line 323  public class DefaultSamplerModel impleme Line 323  public class DefaultSamplerModel impleme
323           * @return The current list of MIDI device models.           * @return The current list of MIDI device models.
324           */           */
325          public MidiDeviceModel[]          public MidiDeviceModel[]
326          getMidiDeviceModels() {          getMidiDevices() {
327                  return midiDeviceModels.toArray(new MidiDeviceModel[midiDeviceModels.size()]);                  return midiDeviceModels.toArray(new MidiDeviceModel[midiDeviceModels.size()]);
328          }          }
329                    
# Line 355  public class DefaultSamplerModel impleme Line 355  public class DefaultSamplerModel impleme
355           * if the device list does not contain MIDI device with ID <code>deviceId</code>.           * if the device list does not contain MIDI device with ID <code>deviceId</code>.
356           */           */
357          public boolean          public boolean
358          removeMidiDevice(int deviceId) {          removeMidiDeviceById(int deviceId) {
359                  for(int i = 0; i < midiDeviceModels.size(); i++) {                  for(int i = 0; i < midiDeviceModels.size(); i++) {
360                          MidiDeviceModel m = midiDeviceModels.get(i);                          MidiDeviceModel m = midiDeviceModels.get(i);
361                          if(m.getDeviceId() == deviceId) {                          if(m.getDeviceId() == deviceId) {
# Line 450  public class DefaultSamplerModel impleme Line 450  public class DefaultSamplerModel impleme
450           * MIDI instrument map with ID <code>mapId</code>.           * MIDI instrument map with ID <code>mapId</code>.
451           */           */
452          public boolean          public boolean
453          removeMidiInstrumentMap(int mapId) {          removeMidiInstrumentMapById(int mapId) {
454                  for(int i = 0; i < midiInstrMaps.size(); i++) {                  for(int i = 0; i < midiInstrMaps.size(); i++) {
455                          MidiInstrumentMap m = getMidiInstrumentMap(i);                          MidiInstrumentMap m = getMidiInstrumentMap(i);
456                          if(m.getMapId() == mapId) {                          if(m.getMapId() == mapId) {
# Line 591  public class DefaultSamplerModel impleme Line 591  public class DefaultSamplerModel impleme
591           * if there is no channel with ID <code>channelId</code>.           * if there is no channel with ID <code>channelId</code>.
592           */           */
593          public SamplerChannelModel          public SamplerChannelModel
594          getChannelModel(int channelId) {          getChannelById(int channelId) {
595                  for(SamplerChannelModel m : channelModels)                  for(SamplerChannelModel m : channelModels)
596                          if(m.getChannelId() == channelId) return m;                          if(m.getChannelId() == channelId) return m;
597                                    
# Line 610  public class DefaultSamplerModel impleme Line 610  public class DefaultSamplerModel impleme
610           * @return The current list of sampler channel models.           * @return The current list of sampler channel models.
611           */           */
612          public SamplerChannelModel[]          public SamplerChannelModel[]
613          getChannelModels() {          getChannels() {
614                  return channelModels.toArray(new SamplerChannelModel[channelModels.size()]);                  return channelModels.toArray(new SamplerChannelModel[channelModels.size()]);
615          }          }
616                    
# Line 663  public class DefaultSamplerModel impleme Line 663  public class DefaultSamplerModel impleme
663           * if the channel's list does not contain channel with ID <code>channelId</code>.           * if the channel's list does not contain channel with ID <code>channelId</code>.
664           */           */
665          public boolean          public boolean
666          removeChannel(int channelId) {          removeChannelById(int channelId) {
667                  for(int i = 0; i < channelModels.size(); i++) {                  for(int i = 0; i < channelModels.size(); i++) {
668                          SamplerChannelModel m = channelModels.get(i);                          SamplerChannelModel m = channelModels.get(i);
669                          if(m.getChannelId() == channelId) {                          if(m.getChannelId() == channelId) {
# Line 785  public class DefaultSamplerModel impleme Line 785  public class DefaultSamplerModel impleme
785           * Schedules a new task for resetting the sampler.           * Schedules a new task for resetting the sampler.
786           */           */
787          public void          public void
788          resetBackend() { CC.getTaskQueue().add(new org.jsampler.task.ResetSampler()); }          resetBackend() { CC.getTaskQueue().add(new org.jsampler.task.Global.ResetSampler()); }
789                    
790          /**          /**
791           * Updates the current and the maximum number of active voices in the sampler.           * Updates the current and the maximum number of active voices in the sampler.

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

  ViewVC Help
Powered by ViewVC