mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
actually mute sinks when asked for i, add new function pa_sink_suspend_all
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1661 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
44f91cfafa
commit
6f714d9887
2 changed files with 16 additions and 0 deletions
|
|
@ -587,6 +587,7 @@ void pa_sink_set_mute(pa_sink *s, int mute) {
|
||||||
pa_sink_assert_ref(s);
|
pa_sink_assert_ref(s);
|
||||||
|
|
||||||
changed = s->muted != mute;
|
changed = s->muted != mute;
|
||||||
|
s->muted = mute;
|
||||||
|
|
||||||
if (s->set_mute && s->set_mute(s) < 0)
|
if (s->set_mute && s->set_mute(s) < 0)
|
||||||
s->set_mute = NULL;
|
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;
|
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;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -163,4 +163,6 @@ static inline int PA_SINK_OPENED(pa_sink_state_t x) {
|
||||||
return x == PA_SINK_RUNNING || x == PA_SINK_IDLE;
|
return x == PA_SINK_RUNNING || x == PA_SINK_IDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pa_sink_suspend_all(pa_core *c, int suspend);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue