mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
sink,source: Add a helper function to check whether this is a filter
This commit is contained in:
parent
5adb126259
commit
81f7589a3f
5 changed files with 22 additions and 4 deletions
|
|
@ -580,7 +580,7 @@ void pa_sink_put(pa_sink* s) {
|
|||
pa_assert_ctl_context();
|
||||
|
||||
pa_assert(s->state == PA_SINK_INIT);
|
||||
pa_assert(!(s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER) || s->input_to_master);
|
||||
pa_assert(!(s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER) || pa_sink_is_filter(s));
|
||||
|
||||
/* The following fields must be initialized properly when calling _put() */
|
||||
pa_assert(s->asyncmsgq);
|
||||
|
|
@ -1557,6 +1557,13 @@ pa_sink *pa_sink_get_master(pa_sink *s) {
|
|||
return s;
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
bool pa_sink_is_filter(pa_sink *s) {
|
||||
pa_sink_assert_ref(s);
|
||||
|
||||
return (s->input_to_master != NULL);
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
bool pa_sink_is_passthrough(pa_sink *s) {
|
||||
pa_sink_input *alt_i;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue