summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/source.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-06-08 00:02:15 +0200
committerColin Guthrie <cguthrie@mandriva.org>2009-06-08 22:31:50 +0100
commitd52262367aea179674762344cced386b7d5522f1 (patch)
tree7080362d04f60325a11390391294dc4f212db759 /src/pulsecore/source.c
parent56f457c10d0bd45714a1d2d033ecedab9b46439a (diff)
core: make sure soft mute status stays in sync with hw mute status
This should close rhbz #494851, mandriva bz #51234. Probably the same as our own #572, launchpad #352732.
Diffstat (limited to 'src/pulsecore/source.c')
-rw-r--r--src/pulsecore/source.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 21902509..0baaed11 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -757,8 +757,12 @@ pa_bool_t pa_source_get_mute(pa_source *s, pa_bool_t force_refresh) {
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_MUTE, NULL, 0, NULL) == 0);
- if (old_muted != s->muted)
+ if (old_muted != s->muted) {
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+
+ /* Make sure the soft mute status stays in sync */
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+ }
}
return s->muted;