Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.neomedia
Interface VolumeControl

All Known Implementing Classes:
AbstractVolumeControl

public interface VolumeControl

Control for volume level in media service.

Author:
Damian Minkov

Field Summary
static String CAPTURE_VOLUME_LEVEL_PROPERTY_NAME
          The name of the configuration property which specifies the volume level of audio input.
static String PLAYBACK_VOLUME_LEVEL_PROPERTY_NAME
          The name of the configuration property which specifies the volume level of audio output.
 
Method Summary
 void addVolumeChangeListener(VolumeChangeListener listener)
          Adds a VolumeChangeListener to be informed for any change in the volume levels.
 float getMaxValue()
          Returns the maximum allowed volume value.
 float getMinValue()
          Returns the minimum allowed volume value.
 boolean getMute()
          Get mute state of sound playback.
 float getVolume()
          Current volume value.
 void removeVolumeChangeListener(VolumeChangeListener listener)
          Removes a VolumeChangeListener.
 void setMute(boolean mute)
          Mutes current sound playback.
 float setVolume(float value)
          Changes volume level.
 

Field Detail

CAPTURE_VOLUME_LEVEL_PROPERTY_NAME

static final String CAPTURE_VOLUME_LEVEL_PROPERTY_NAME
The name of the configuration property which specifies the volume level of audio input.

See Also:
Constant Field Values

PLAYBACK_VOLUME_LEVEL_PROPERTY_NAME

static final String PLAYBACK_VOLUME_LEVEL_PROPERTY_NAME
The name of the configuration property which specifies the volume level of audio output.

See Also:
Constant Field Values
Method Detail

getVolume

float getVolume()
Current volume value.

Returns:
the current volume level.

getMinValue

float getMinValue()
Returns the minimum allowed volume value.

Returns:
the minimum allowed volume value.

getMaxValue

float getMaxValue()
Returns the maximum allowed volume value.

Returns:
the maximum allowed volume value.

setVolume

float setVolume(float value)
Changes volume level.

Parameters:
value - the new level to set.
Returns:
the actual level which was set.

setMute

void setMute(boolean mute)
Mutes current sound playback.

Parameters:
mute - mutes/unmutes playback.

getMute

boolean getMute()
Get mute state of sound playback.

Returns:
mute state of sound playback.

addVolumeChangeListener

void addVolumeChangeListener(VolumeChangeListener listener)
Adds a VolumeChangeListener to be informed for any change in the volume levels.

Parameters:
listener - volume change listener.

removeVolumeChangeListener

void removeVolumeChangeListener(VolumeChangeListener listener)
Removes a VolumeChangeListener.

Parameters:
listener - the volume change listener to be removed.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.