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 |
*/ |
*/ |