mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -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@1662 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
6f714d9887
commit
3d9299029c
2 changed files with 16 additions and 0 deletions
|
|
@ -320,6 +320,7 @@ void pa_source_set_mute(pa_source *s, int mute) {
|
||||||
pa_source_assert_ref(s);
|
pa_source_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;
|
||||||
|
|
@ -438,3 +439,16 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pa_source_suspend_all(pa_core *c, int suspend) {
|
||||||
|
uint32_t idx;
|
||||||
|
pa_source *source;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
pa_core_assert_ref(c);
|
||||||
|
|
||||||
|
for (source = PA_SOURCE(pa_idxset_first(c->sources, &idx)); source; source = PA_SOURCE(pa_idxset_next(c->sources, &idx)))
|
||||||
|
ret -= pa_source_suspend(source, suspend) < 0;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -152,4 +152,6 @@ static inline int PA_SOURCE_OPENED(pa_source_state_t x) {
|
||||||
return x == PA_SOURCE_RUNNING || x == PA_SOURCE_IDLE;
|
return x == PA_SOURCE_RUNNING || x == PA_SOURCE_IDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pa_source_suspend_all(pa_core *c, int suspend);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue