Skip to content
Snippets Groups Projects
Commit 8b220cff authored by Vincent Lucas's avatar Vincent Lucas
Browse files

Falls back to software volume settings when the volume of current input device can nt be changed.

parent 45735846
No related branches found
No related tags found
No related merge requests found
...@@ -214,6 +214,13 @@ protected float getInputDeviceVolume(String deviceUID) ...@@ -214,6 +214,13 @@ protected float getInputDeviceVolume(String deviceUID)
public float getVolume() public float getVolume()
{ {
String deviceUID = getCaptureDeviceUID(); 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;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment