diff options
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r-- | src/pulsecore/sink.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index d1d9785a..e770950c 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -556,3 +556,17 @@ void pa_sink_set_description(pa_sink *s, const char *description) { pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index); } + +unsigned pa_sink_used_by(pa_sink *s) { + unsigned ret; + + assert(s); + assert(s->ref >= 1); + + ret = pa_idxset_size(s->inputs); + + if (s->monitor_source) + ret += pa_source_used_by(s->monitor_source); + + return ret; +} |