apply volumes properly more than once in a row
authorLennart Poettering <lennart@poettering.net>
Fri, 15 Aug 2008 12:37:54 +0000 (14:37 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 15 Aug 2008 12:37:54 +0000 (14:37 +0200)
src/modules/module-stream-restore.c

index e0683e7..5b9922e 100644 (file)
@@ -418,8 +418,9 @@ static void apply_entry(struct userdata *u, const char *name, struct entry *e) {
         }
 
         if (u->restore_volume) {
+            pa_cvolume v = e->volume;
             pa_log_info("Restoring volume for sink input %s.", name);
-            pa_sink_input_set_volume(si, pa_cvolume_remap(&e->volume, &e->channel_map, &si->channel_map));
+            pa_sink_input_set_volume(si, pa_cvolume_remap(&v, &e->channel_map, &si->channel_map));
         }
 
         if (u->restore_muted) {