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
|
|
@ -531,7 +531,7 @@ void pa_source_put(pa_source *s) {
|
|||
pa_assert_ctl_context();
|
||||
|
||||
pa_assert(s->state == PA_SOURCE_INIT);
|
||||
pa_assert(!(s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER) || s->output_from_master);
|
||||
pa_assert(!(s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER) || pa_source_is_filter(s));
|
||||
|
||||
/* The following fields must be initialized properly when calling _put() */
|
||||
pa_assert(s->asyncmsgq);
|
||||
|
|
@ -1172,6 +1172,13 @@ pa_source *pa_source_get_master(pa_source *s) {
|
|||
return s;
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
bool pa_source_is_filter(pa_source *s) {
|
||||
pa_source_assert_ref(s);
|
||||
|
||||
return (s->output_from_master != NULL);
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
bool pa_source_is_passthrough(pa_source *s) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue