33 |
import org.jsampler.event.SamplerChannelEvent; |
import org.jsampler.event.SamplerChannelEvent; |
34 |
import org.jsampler.event.SamplerChannelListener; |
import org.jsampler.event.SamplerChannelListener; |
35 |
|
|
36 |
|
import org.jsampler.task.DuplicateChannels; |
37 |
import org.jsampler.task.LoadEngine; |
import org.jsampler.task.LoadEngine; |
38 |
import org.jsampler.task.LoadInstrument; |
import org.jsampler.task.LoadInstrument; |
39 |
|
import org.jsampler.task.ResetChannel; |
40 |
import org.jsampler.task.SetChannelAudioOutputDevice; |
import org.jsampler.task.SetChannelAudioOutputDevice; |
41 |
import org.jsampler.task.SetChannelMidiInputChannel; |
import org.jsampler.task.SetChannelMidiInputChannel; |
42 |
import org.jsampler.task.SetChannelMidiInputDevice; |
import org.jsampler.task.SetChannelMidiInputDevice; |
49 |
|
|
50 |
|
|
51 |
/** |
/** |
52 |
* |
* This class provides default implementation of the <code>SamplerChannelModel</code> interface. |
53 |
* @author Grigor Iliev |
* @author Grigor Iliev |
54 |
*/ |
*/ |
55 |
public class DefaultSamplerChannelModel implements SamplerChannelModel { |
public class DefaultSamplerChannelModel implements SamplerChannelModel { |
103 |
|
|
104 |
/** |
/** |
105 |
* Sets the current settings of the sampler channel. |
* Sets the current settings of the sampler channel. |
106 |
|
* Note that this method does not changes the channel settings on |
107 |
|
* the back-end. It is invoked to update them when the back-end |
108 |
|
* notifies that the channel settings are changed. |
109 |
* @param channel A <code>SamplerChannel</code> instance containing |
* @param channel A <code>SamplerChannel</code> instance containing |
110 |
* the new settings for this sampler channel. |
* the new settings for this sampler channel. |
111 |
* @throws IllegalArgumentException If <code>channel</code> is <code>null</code>. |
* @throws IllegalArgumentException If <code>channel</code> is <code>null</code>. |
374 |
// We leave this event to be notified by the LinuxSampler notification system. |
// We leave this event to be notified by the LinuxSampler notification system. |
375 |
} |
} |
376 |
|
|
377 |
|
/** Resets the channel. */ |
378 |
|
public void |
379 |
|
resetChannel() { |
380 |
|
CC.getTaskQueue().add(new ResetChannel(getChannelID())); |
381 |
|
|
382 |
|
// We leave this event to be notified by the LinuxSampler notification system. |
383 |
|
} |
384 |
|
|
385 |
|
/** Duplicates the channel. */ |
386 |
|
public void |
387 |
|
duplicateChannel() { |
388 |
|
CC.getTaskQueue().add(new DuplicateChannels(getChannelInfo())); |
389 |
|
} |
390 |
|
|
391 |
/** Notifies listeners that the sampler channel settings has changed. */ |
/** Notifies listeners that the sampler channel settings has changed. */ |
392 |
protected void |
protected void |
393 |
fireSamplerChannelChanged() { |
fireSamplerChannelChanged() { |