[pulseaudio-commits] src/modules
Arun Raghavan
arun at kemper.freedesktop.org
Sun Oct 16 21:21:24 PDT 2011
src/modules/alsa/alsa-sink.c | 8 ++++++--
src/modules/alsa/alsa-source.c | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
New commits:
commit ca6057316dfff6baf4698fccc1439256ce594a9e
Author: David Henningsson <david.henningsson at canonical.com>
Date: Thu Oct 13 17:30:39 2011 +0200
Fix deferred volume not being applied if sink is closed
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index c868453..3a95251 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1751,8 +1751,12 @@ static void thread_func(void *userdata) {
if (u->sink->flags & PA_SINK_DEFERRED_VOLUME) {
pa_usec_t volume_sleep;
pa_sink_volume_change_apply(u->sink, &volume_sleep);
- if (volume_sleep > 0)
- rtpoll_sleep = PA_MIN(volume_sleep, rtpoll_sleep);
+ if (volume_sleep > 0) {
+ if (rtpoll_sleep > 0)
+ rtpoll_sleep = PA_MIN(volume_sleep, rtpoll_sleep);
+ else
+ rtpoll_sleep = volume_sleep;
+ }
}
if (rtpoll_sleep > 0)
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index d544828..46b89a7 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1452,8 +1452,12 @@ static void thread_func(void *userdata) {
if (u->source->flags & PA_SOURCE_DEFERRED_VOLUME) {
pa_usec_t volume_sleep;
pa_source_volume_change_apply(u->source, &volume_sleep);
- if (volume_sleep > 0)
- rtpoll_sleep = PA_MIN(volume_sleep, rtpoll_sleep);
+ if (volume_sleep > 0) {
+ if (rtpoll_sleep > 0)
+ rtpoll_sleep = PA_MIN(volume_sleep, rtpoll_sleep);
+ else
+ rtpoll_sleep = volume_sleep;
+ }
}
if (rtpoll_sleep > 0)
More information about the pulseaudio-commits
mailing list