--- jlscp/trunk/src/org/linuxsampler/lscp/AudioOutputDevice.java 2005/10/02 14:40:52 783 +++ jlscp/trunk/src/org/linuxsampler/lscp/AudioOutputDevice.java 2005/10/10 14:55:44 784 @@ -30,6 +30,8 @@ private Parameter channels = null; private Parameter samplerate = null; + private AudioOutputChannel[] audioChannels = new AudioOutputChannel[0]; + /** Creates a new instance of AudioOutputDevice */ public @@ -78,4 +80,39 @@ */ public void setSampleRateParameter(Parameter samplerate) { this.samplerate = samplerate; } + + /** + * Gets the current non-null + * list of audio channels this device offers. + * @return An AudioOutputChannel array + * providing all audio channels this device offers. + */ + public AudioOutputChannel[] + getAudioChannels() { return audioChannels; } + + /** + * Sets the current list of audio output channels. + * @param channels The new list of audio output channels. + * @throws IllegalArgumentException If channels is null. + */ + public void + setAudioChannels(AudioOutputChannel[] channels) { + if(channels == null) + throw new IllegalArgumentException("channels must be non null"); + audioChannels = channels; + } + + /** + * Gets the audio output channel at the specified index. + * @param index The index of the audio output channel to be retrieved. + */ + public AudioOutputChannel + getAudioChannel(int index) { return audioChannels[index]; } + + /** + * Gets the current number of audio output channels this device offers. + * @return The current number of audio output channels this device offers. + */ + public int + getAudioChannelCount() { return audioChannels.length; } }