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

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

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

revision 1142 by iliev, Mon Aug 7 18:25:58 2006 UTC revision 1143 by iliev, Mon Apr 2 21:18:31 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *   JSampler - a java front-end for LinuxSampler   *   JSampler - a java front-end for LinuxSampler
3   *   *
4   *   Copyright (C) 2005 Grigor Kirilov Iliev   *   Copyright (C) 2005-2007 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 29  import javax.swing.SwingUtilities; Line 29  import javax.swing.SwingUtilities;
29  import org.jsampler.event.AudioDeviceEvent;  import org.jsampler.event.AudioDeviceEvent;
30  import org.jsampler.event.AudioDeviceListener;  import org.jsampler.event.AudioDeviceListener;
31    
32    import org.jsampler.task.Audio;
33    
34  import org.linuxsampler.lscp.AudioOutputDevice;  import org.linuxsampler.lscp.AudioOutputDevice;
35    import org.linuxsampler.lscp.Parameter;
36    
37    
38  /**  /**
# Line 77  public class DefaultAudioDeviceModel imp Line 80  public class DefaultAudioDeviceModel imp
80           * -1 if the device number is not set.           * -1 if the device number is not set.
81           */           */
82          public int          public int
83          getDeviceID() { return audioDevice.getDeviceID(); }          getDeviceId() { return audioDevice.getDeviceId(); }
84                    
85          /**          /**
86           * Gets the current settings of the audio device represented by this model.           * Gets the current settings of the audio device represented by this model.
# Line 118  public class DefaultAudioDeviceModel imp Line 121  public class DefaultAudioDeviceModel imp
121          isActive() { return audioDevice.isActive(); }          isActive() { return audioDevice.isActive(); }
122                    
123          /**          /**
124             * Schedules a new task for enabling/disabling the audio device.
125             * @param active If <code>true</code> the audio device is enabled,
126             * else the device is disabled.
127             */
128            public void
129            setBackendActive(boolean active) {
130                    CC.getTaskQueue().add(new Audio.EnableDevice(getDeviceId(), active));
131            }
132            
133            /**
134             * Schedules a new task for changing the channel number of the audio device.
135             * @param channels The new number of audio channels.
136             */
137            public void
138            setBackendChannelCount(int channels) {
139                    CC.getTaskQueue().add(new Audio.SetChannelCount(getDeviceId(), channels));
140            }
141            
142            /**
143             * Schedules a new task for altering a specific
144             * setting of the specified audio output channel.
145             * @param channel The channel number.
146             * @param prm The parameter to be set.
147             */
148            public void
149            setBackendChannelParameter(int channel, Parameter prm) {
150                    CC.getTaskQueue().add(new Audio.SetChannelParameter(getDeviceId(), channel, prm));
151            }
152            
153            /**
154           * Notifies listeners that the settings of the audio device are changed.           * Notifies listeners that the settings of the audio device are changed.
155           */           */
156          private void          private void

Legend:
Removed from v.1142  
changed lines
  Added in v.1143

  ViewVC Help
Powered by ViewVC