[pulseaudio-commits] src/pulsecore
Arun Raghavan
arun at kemper.freedesktop.org
Mon Aug 29 02:04:03 PDT 2011
src/pulsecore/sink.c | 2 +-
src/pulsecore/source.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit ed4a4480dca73ee931814b318c2ec9541ddf9c35
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Fri Aug 26 09:51:07 2011 +0530
passthrough: Fix setting volume to unamplified again
Thanks to Tanu for pointing out the (possibly pathological?) case that
base_volume might be >0dB.
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index b0c360d..041295c 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1406,7 +1406,7 @@ void pa_sink_enter_passthrough(pa_sink *s) {
s->saved_volume = *pa_sink_get_volume(s, TRUE);
s->saved_save_volume = s->save_volume;
- pa_cvolume_set(&volume, s->sample_spec.channels, s->base_volume);
+ pa_cvolume_set(&volume, s->sample_spec.channels, PA_MIN(s->base_volume, PA_VOLUME_NORM));
pa_sink_set_volume(s, &volume, TRUE, FALSE);
}
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index d79dbb1..bc951af 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -986,7 +986,7 @@ void pa_source_enter_passthrough(pa_source *s) {
s->saved_volume = *pa_source_get_volume(s, TRUE);
s->saved_save_volume = s->save_volume;
- pa_cvolume_set(&volume, s->sample_spec.channels, s->base_volume);
+ pa_cvolume_set(&volume, s->sample_spec.channels, PA_MIN(s->base_volume, PA_VOLUME_NORM));
pa_source_set_volume(s, &volume, TRUE, FALSE);
}
More information about the pulseaudio-commits
mailing list