JSampler
v0.8a

org.jsampler
Interface AudioDeviceModel

All Known Implementing Classes:
DefaultAudioDeviceModel

public interface AudioDeviceModel

A data model for an audio output device.


Method Summary
 void addAudioDeviceListener(AudioDeviceListener l)
          Registers the specified listener to be notified when the settings of the audio device are changed.
 int getDeviceId()
          Gets the numerical ID of this audio device.
 AudioOutputDevice getDeviceInfo()
          Gets the current settings of the audio device represented by this model.
 boolean isActive()
          Determines whether the audio device is active.
 void removeAudioDeviceListener(AudioDeviceListener l)
          Removes the specified listener.
 void setActive(boolean active)
          Sets whether the audio device is enabled or disabled.
 void setBackendActive(boolean active)
          Schedules a new task for enabling/disabling the audio device.
 void setBackendChannelCount(int channels)
          Schedules a new task for changing the channel number of the audio device.
 void setBackendChannelParameter(int channel, Parameter prm)
          Schedules a new task for altering a specific setting of the specified audio output channel.
 void setBackendDeviceParameter(Parameter prm)
          Schedules a new task for altering a specific setting of the audio output device.
 void setDeviceInfo(AudioOutputDevice device)
          Updates the settings of the audio device represented by this model.
 

Method Detail

addAudioDeviceListener

void addAudioDeviceListener(AudioDeviceListener l)
Registers the specified listener to be notified when the settings of the audio device are changed.

Parameters:
l - The AudioDeviceListener to register.

removeAudioDeviceListener

void removeAudioDeviceListener(AudioDeviceListener l)
Removes the specified listener.

Parameters:
l - The AudioDeviceListener to remove.

getDeviceId

int getDeviceId()
Gets the numerical ID of this audio device.

Returns:
The numerical ID of this audio device or -1 if the device number is not set.

getDeviceInfo

AudioOutputDevice getDeviceInfo()
Gets the current settings of the audio device represented by this model.

Returns:
AudioOutputDevice instance providing the current settings of the audio device represented by this model.

setDeviceInfo

void setDeviceInfo(AudioOutputDevice device)
Updates the settings of the audio device represented by this model.

Parameters:
device - The new audio device settings.

setActive

void setActive(boolean active)
Sets whether the audio device is enabled or disabled.

Parameters:
active - If true the audio device is enabled, else the device is disabled.

isActive

boolean isActive()
Determines whether the audio device is active.

Returns:
true if the device is enabled and false otherwise.

setBackendActive

void setBackendActive(boolean active)
Schedules a new task for enabling/disabling the audio device.

Parameters:
active - If true the audio device is enabled, else the device is disabled.

setBackendDeviceParameter

void setBackendDeviceParameter(Parameter prm)
Schedules a new task for altering a specific setting of the audio output device.

Parameters:
prm - The parameter to be set.

setBackendChannelCount

void setBackendChannelCount(int channels)
Schedules a new task for changing the channel number of the audio device.

Parameters:
channels - The new number of audio channels.

setBackendChannelParameter

void setBackendChannelParameter(int channel,
                                Parameter prm)
Schedules a new task for altering a specific setting of the specified audio output channel.

Parameters:
channel - The channel number.
prm - The parameter to be set.

JSampler
v0.8a

Copyright © 2007 Grigor Iliev. All rights reserved.