--- jsampler/trunk/src/org/jsampler/DefaultSamplerChannelModel.java 2005/10/10 16:03:12 787 +++ jsampler/trunk/src/org/jsampler/DefaultSamplerChannelModel.java 2006/08/07 18:25:58 911 @@ -33,8 +33,10 @@ import org.jsampler.event.SamplerChannelEvent; import org.jsampler.event.SamplerChannelListener; +import org.jsampler.task.DuplicateChannels; import org.jsampler.task.LoadEngine; import org.jsampler.task.LoadInstrument; +import org.jsampler.task.ResetChannel; import org.jsampler.task.SetChannelAudioOutputDevice; import org.jsampler.task.SetChannelMidiInputChannel; import org.jsampler.task.SetChannelMidiInputDevice; @@ -47,7 +49,7 @@ /** - * + * This class provides default implementation of the SamplerChannelModel interface. * @author Grigor Iliev */ public class DefaultSamplerChannelModel implements SamplerChannelModel { @@ -101,6 +103,9 @@ /** * Sets the current settings of the sampler channel. + * Note that this method does not changes the channel settings on + * the back-end. It is invoked to update them when the back-end + * notifies that the channel settings are changed. * @param channel A SamplerChannel instance containing * the new settings for this sampler channel. * @throws IllegalArgumentException If channel is null. @@ -369,6 +374,20 @@ // We leave this event to be notified by the LinuxSampler notification system. } + /** Resets the channel. */ + public void + resetChannel() { + CC.getTaskQueue().add(new ResetChannel(getChannelID())); + + // We leave this event to be notified by the LinuxSampler notification system. + } + + /** Duplicates the channel. */ + public void + duplicateChannel() { + CC.getTaskQueue().add(new DuplicateChannels(getChannelInfo())); + } + /** Notifies listeners that the sampler channel settings has changed. */ protected void fireSamplerChannelChanged() {