public class HardwareVolumeControl extends BasicVolumeControl
Modifier and Type | Field and Description |
---|---|
(package private) MediaServiceImpl |
mediaServiceImpl
The media service implementation.
|
MAX_VOLUME_LEVEL, MAX_VOLUME_PERCENT, MIN_VOLUME_LEVEL, MIN_VOLUME_PERCENT, volumeLevel
CAPTURE_VOLUME_LEVEL_PROPERTY_NAME, PLAYBACK_VOLUME_LEVEL_PROPERTY_NAME
Constructor and Description |
---|
HardwareVolumeControl(MediaServiceImpl mediaServiceImpl,
java.lang.String volumeLevelConfigurationPropertyName)
Creates volume control instance and initializes initial level value
if stored in the configuration service.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getCaptureDeviceUID()
Returns the selected input device UID.
|
protected static float |
getDefaultVolumeLevel()
Returns the default volume level.
|
protected static float |
getGainReferenceLevel()
Returns the reference volume level for computing the gain.
|
protected float |
getInputDeviceVolume(java.lang.String deviceUID)
Returns the device volume via the system API.
|
float |
getVolume()
Current volume value.
|
protected int |
setInputDeviceVolume(java.lang.String deviceUID,
float volume)
Changes the device volume via the system API.
|
protected void |
updateHardwareVolume()
Modifies the hardware microphone sensibility (hardware amplification).
|
addGainChangeListener, addVolumeChangeListener, applyGain, getControlComponent, getDB, getLevel, getMaxValue, getMinValue, getMute, loadVolume, removeGainChangeListener, removeVolumeChangeListener, setDB, setLevel, setMute, setVolume
MediaServiceImpl mediaServiceImpl
public HardwareVolumeControl(MediaServiceImpl mediaServiceImpl, java.lang.String volumeLevelConfigurationPropertyName)
mediaServiceImpl
- The media service implementation.volumeLevelConfigurationPropertyName
- the name of the configuration
property which specifies the value of the volume level of the new
instanceprotected static float getDefaultVolumeLevel()
protected static float getGainReferenceLevel()
protected void updateHardwareVolume()
updateHardwareVolume
in class BasicVolumeControl
protected java.lang.String getCaptureDeviceUID()
protected int setInputDeviceVolume(java.lang.String deviceUID, float volume)
deviceUID
- The device ID.volume
- The volume requested.protected float getInputDeviceVolume(java.lang.String deviceUID)
deviceUID
- The device ID.public float getVolume()
getVolume
in interface VolumeControl
getVolume
in class BasicVolumeControl
VolumeControl
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.