From 382e7aefd471a4600010a04e6497d4bfd2fd8663 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 18 Jun 2004 17:12:50 +0000 Subject: some more work git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@23 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/sourceoutput.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/sourceoutput.c') diff --git a/src/sourceoutput.c b/src/sourceoutput.c index d4e7a50f..8021b522 100644 --- a/src/sourceoutput.c +++ b/src/sourceoutput.c @@ -3,6 +3,7 @@ #include #include "sourceoutput.h" +#include "strbuf.h" struct source_output* source_output_new(struct source *s, struct sample_spec *spec, const char *name) { struct source_output *o; @@ -45,3 +46,25 @@ void source_output_kill(struct source_output*i) { if (i->kill) i->kill(i); } + +char *source_output_list_to_string(struct core *c) { + struct strbuf *s; + struct source_output *o; + uint32_t index = IDXSET_INVALID; + assert(c); + + s = strbuf_new(); + assert(s); + + strbuf_printf(s, "%u source outputs(s) available.\n", idxset_ncontents(c->source_outputs)); + + for (o = idxset_first(c->source_outputs, &index); o; o = idxset_next(c->source_outputs, &index)) { + assert(o->source); + strbuf_printf(s, " %c index: %u, name: <%s>, source: <%u>\n", + o->index, + o->name, + o->source->index); + } + + return strbuf_tostring_free(s); +} -- cgit