/[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 2199 by iliev, Tue Jun 28 22:44:39 2011 UTC revision 2200 by iliev, Sun Jul 3 22:01:16 2011 UTC
# Line 256  public class DefaultSamplerModel impleme Line 256  public class DefaultSamplerModel impleme
256          }          }
257                    
258          /**          /**
259             * Gets the index of the audio device with ID <code>deviceId</code>.
260             * @param deviceId The ID of the audio device whose
261             * position in the audio device list should be obtained.
262             * @return The zero-based position of the specified audio device
263             * in the audio device list or <code>-1</code>
264             * if there is no audio device with ID <code>deviceId</code>.
265             */
266            public int getAudioDeviceIndex(int deviceId) {
267                    for(int i = 0; i < audioDeviceModels.size(); i++) {
268                            if(audioDeviceModels.get(i).getDeviceId() == deviceId) return i;
269                    }
270                    
271                    return -1;
272            }
273            
274            /**
275           * Gets the current number of audio devices.           * Gets the current number of audio devices.
276           * @return The current number of audio devices.           * @return The current number of audio devices.
277           */           */

Legend:
Removed from v.2199  
changed lines
  Added in v.2200

  ViewVC Help
Powered by ViewVC