diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-02-08 17:21:05 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-02-08 17:21:05 +0000 |
commit | ea417ae84133c26aed0b257376ab1d1c567a9779 (patch) | |
tree | f889cfcbaf1efe9f20e338b27f516bf8f6f3976b /src/pulse-manager.c | |
parent | f9ef87f71c488f6791e32b1cf7205fb65db81ce8 (diff) | |
download | ayatana-indicator-sound-ea417ae84133c26aed0b257376ab1d1c567a9779.tar.gz ayatana-indicator-sound-ea417ae84133c26aed0b257376ab1d1c567a9779.tar.bz2 ayatana-indicator-sound-ea417ae84133c26aed0b257376ab1d1c567a9779.zip |
automatic slider volume updates working
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 |