1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From 04181589dfe9e28ee55354f3b8b482831272566f Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marc-Andr=C3=A9=20Lureau?= <marc-andre.lureau@nokia.com>
Date: Tue, 23 Jun 2009 19:38:55 +0300
Subject: [PATCH 70/85] stream-restore: don't override volume entry, when applied to different channel maps
---
src/modules/module-stream-restore.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index 4661884..2354ed1 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -788,8 +788,11 @@ static void apply_entry(struct userdata *u, const char *name, struct entry *e) {
pa_xfree(n);
if (u->restore_volume && e->volume_valid) {
- 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), TRUE, e->volume_is_absolute);
+ pa_cvolume v;
+
+ pa_log_info("Restoring volume for sink input %s. c %d vol %d", name, e->channel_map.channels, e->volume.values[0]);
+ v = e->volume;
+ pa_sink_input_set_volume(si, pa_cvolume_remap(&v, &e->channel_map, &si->channel_map), TRUE, e->volume_is_absolute);
}
if (u->restore_muted && e->muted_valid) {
--
1.6.3.3
|