diff options
Diffstat (limited to 'src/pulse-manager.c')
-rw-r--r-- | src/pulse-manager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pulse-manager.c b/src/pulse-manager.c index 87f20ae..ff6f1bb 100644 --- a/src/pulse-manager.c +++ b/src/pulse-manager.c @@ -290,8 +290,11 @@ static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, v { //update the UI pa_volume_t vol = pa_cvolume_avg(&s->volume); + // Use the base of the device to ensure maximum acceptable levels on the hardware + gint volume_percent = (vol/s->base_volume); + g_debug("When using base volume => volume = %i", volume_percent); g_debug("about to update ui with linear volume of %f", pa_sw_volume_to_linear(vol)); - sound_service_dbus_update_sink_volume(dbus_service, vol * 100); + sound_service_dbus_update_sink_volume(dbus_service, pa_sw_volume_to_linear(vol) * 100); } } else |