From 8b220cff02ecf9085ac1cef1e54909cf42a13119 Mon Sep 17 00:00:00 2001 From: Vincent Lucas <chenzo@jitsi.org> Date: Wed, 12 Jun 2013 20:32:38 +0200 Subject: [PATCH] Falls back to software volume settings when the volume of current input device can nt be changed. --- src/org/jitsi/impl/neomedia/HardwareVolumeControl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/org/jitsi/impl/neomedia/HardwareVolumeControl.java b/src/org/jitsi/impl/neomedia/HardwareVolumeControl.java index 33904495..ca480691 100644 --- a/src/org/jitsi/impl/neomedia/HardwareVolumeControl.java +++ b/src/org/jitsi/impl/neomedia/HardwareVolumeControl.java @@ -214,6 +214,13 @@ protected float getInputDeviceVolume(String deviceUID) public float getVolume() { String deviceUID = getCaptureDeviceUID(); - return this.getInputDeviceVolume(deviceUID); + float volume = this.getInputDeviceVolume(deviceUID); + // If the hardware voume for this device is not available, then switch + // to the software volume. + if(volume == -1) + { + volume = super.getVolume(); + } + return volume; } } -- GitLab