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 |
|
|
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 |
|
|
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) { |
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 |
|
|
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 |
|
|
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) { |
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) { |
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 |
|
|
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 |
|
|
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) { |
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. |