summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-10-07 22:42:13 +0200
committerLennart Poettering <lennart@poettering.net>2008-10-23 22:52:41 +0200
commitfc2ba1f914b2d015c9c43951c6ffb917977257b1 (patch)
treeed4620ceac88098110e77a3ca68c2be832bf78d7 /src/pulsecore
parent31318274ff84e2d359aa762ffcde09eae115d2d4 (diff)
instead of resetting virtual_volume unconditionally on initialization, do so only when no volume was set before
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/sink-input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 4f70347f..508591ef 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -150,8 +150,10 @@ pa_sink_input* pa_sink_input_new(
pa_return_null_if_fail(pa_channel_map_valid(&data->channel_map));
pa_return_null_if_fail(data->channel_map.channels == data->sample_spec.channels);
- if (!data->volume_is_set)
+ if (!data->volume_is_set) {
pa_cvolume_reset(&data->volume, data->sample_spec.channels);
+ pa_cvolume_reset(&data->virtual_volume, data->sample_spec.channels);
+ }
pa_return_null_if_fail(pa_cvolume_valid(&data->volume));
pa_return_null_if_fail(data->volume.channels == data->sample_spec.channels);