summaryrefslogtreecommitdiffstats
path: root/src/source.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-07-04 17:40:15 +0000
committerLennart Poettering <lennart@poettering.net>2004-07-04 17:40:15 +0000
commit722c2c8c8785d215ec3ec8757168b82c9600f4a3 (patch)
treedf890b4c37c8158b9555a19386b88b189000fe37 /src/source.c
parente61c2dddb7bc392ab4073d5691870615ada82922 (diff)
add kill_* and default_* commands to CLI
make module-cli unload itself on EOF clean up stdio usage add sink pointer to monitor sources git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@50 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/source.c')
-rw-r--r--src/source.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/source.c b/src/source.c
index 9a4f95a2..1c97604b 100644
--- a/src/source.c
+++ b/src/source.c
@@ -26,6 +26,7 @@ struct pa_source* pa_source_new(struct pa_core *core, const char *name, int fail
s->core = core;
s->sample_spec = *spec;
s->outputs = pa_idxset_new(NULL, NULL);
+ s->monitor_of = NULL;
s->notify = NULL;
s->userdata = NULL;
@@ -109,8 +110,12 @@ char *pa_source_list_to_string(struct pa_core *c) {
default_source = pa_source_get_default(c);
- for (source = pa_idxset_first(c->sources, &index); source; source = pa_idxset_next(c->sources, &index))
- pa_strbuf_printf(s, " %c index: %u, name: <%s>\n", source == default_source ? '*' : ' ', source->index, source->name);
+ for (source = pa_idxset_first(c->sources, &index); source; source = pa_idxset_next(c->sources, &index)) {
+ char mo[256] = "";
+ if (source->monitor_of)
+ snprintf(mo, sizeof(mo), ", monitor_of: <%u>", source->monitor_of->index);
+ pa_strbuf_printf(s, " %c index: %u, name: <%s>%s\n", source == default_source ? '*' : ' ', source->index, source->name, mo);
+ }
return pa_strbuf_tostring_free(s);
}