summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-10-08 00:14:25 +0200
committerLennart Poettering <lennart@poettering.net>2008-10-08 00:14:25 +0200
commit34f6a516b2e5fd0ca4143eed9831759fcbc89cb0 (patch)
tree217768a4ad7addce42e0be8453565dc87098b96b /src
parentb048ae9f789cdbc7540b343fb1890a86d91a505f (diff)
use pa_sink_set_volume() for changing the volume
Diffstat (limited to 'src')
-rw-r--r--src/modules/module-flat-volume.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/modules/module-flat-volume.c b/src/modules/module-flat-volume.c
index 02e3ed13..25b5707e 100644
--- a/src/modules/module-flat-volume.c
+++ b/src/modules/module-flat-volume.c
@@ -95,16 +95,8 @@ static void process_input_volume_change(
/* Set the master volume, and normalize inputs */
if (!pa_cvolume_equal(&max_volume, &sink->volume)) {
- /* copied from pa_sink_set_volume(): need to call from here to avoid sink hooks */
- /* alternatively, could create an extra function pa_sink_set_volume_full()? */
- sink->volume = max_volume;
- if (sink->set_volume && sink->set_volume(sink) < 0)
- sink->set_volume = NULL;
- if (!sink->set_volume)
- pa_sink_set_soft_volume(sink, &max_volume);
-
- pa_subscription_post(sink->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, sink->index);
+ pa_sink_set_volume(sink, &max_volume);
pa_log_debug("sink = %.2f (changed)", (double)pa_cvolume_avg(&sink->volume)/PA_VOLUME_NORM);