summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pulsecore/sink.c14
-rw-r--r--src/pulsecore/sink.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index cfead9be..2c7c661c 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -587,6 +587,7 @@ void pa_sink_set_mute(pa_sink *s, int mute) {
pa_sink_assert_ref(s);
changed = s->muted != mute;
+ s->muted = mute;
if (s->set_mute && s->set_mute(s) < 0)
s->set_mute = NULL;
@@ -819,3 +820,16 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
return -1;
}
+
+int pa_sink_suspend_all(pa_core *c, int suspend) {
+ pa_sink *sink;
+ uint32_t idx;
+ int ret = 0;
+
+ pa_core_assert_ref(c);
+
+ for (sink = PA_SINK(pa_idxset_first(c->sinks, &idx)); sink; sink = PA_SINK(pa_idxset_next(c->sinks, &idx)))
+ ret -= pa_sink_suspend(sink, suspend) < 0;
+
+ return ret;
+}
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index 8a6fa236..fadc76eb 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -163,4 +163,6 @@ static inline int PA_SINK_OPENED(pa_sink_state_t x) {
return x == PA_SINK_RUNNING || x == PA_SINK_IDLE;
}
+int pa_sink_suspend_all(pa_core *c, int suspend);
+
#endif