summaryrefslogtreecommitdiffstats
path: root/polyp/cli-command.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-07 14:58:42 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-07 14:58:42 +0000
commit93c8fe6577b59176ed6a54a1ae98f8749f122dc8 (patch)
tree7d3864484d318a41024c3cfa9af0b158bc24f6c3 /polyp/cli-command.c
parent0fa499db56dc9111ddd866080606cb8b0379280e (diff)
change the way the default sink/source is selected
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@183 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/cli-command.c')
-rw-r--r--polyp/cli-command.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/polyp/cli-command.c b/polyp/cli-command.c
index 1d2788fa..4c4f566b 100644
--- a/polyp/cli-command.c
+++ b/polyp/cli-command.c
@@ -210,8 +210,30 @@ static int pa_cli_command_source_outputs(struct pa_core *c, struct pa_tokenizer
}
static int pa_cli_command_stat(struct pa_core *c, struct pa_tokenizer *t, struct pa_strbuf *buf, int *fail, int *verbose) {
+ char s[256];
assert(c && t);
- pa_strbuf_printf(buf, "Memory blocks currently allocated: %u, size: %u bytes.\nMemory blocks allocated during the whole lifetime: %u, size: %u bytes.\n", c->memblock_stat->total, c->memblock_stat->total_size, c->memblock_stat->allocated, c->memblock_stat->allocated_size);
+
+ pa_bytes_snprint(s, sizeof(s), c->memblock_stat->total_size);
+ pa_strbuf_printf(buf, "Memory blocks currently allocated: %u, size: %s.\n",
+ c->memblock_stat->total,
+ s);
+
+ pa_bytes_snprint(s, sizeof(s), c->memblock_stat->allocated_size);
+ pa_strbuf_printf(buf, "Memory blocks allocated during the whole lifetime: %u, size: %s.\n",
+ c->memblock_stat->allocated,
+ s);
+
+ pa_bytes_snprint(s, sizeof(s), pa_scache_total_size(c));
+ pa_strbuf_printf(buf, "Total sample cache size: %s.\n", s);
+
+ pa_sample_spec_snprint(s, sizeof(s), &c->default_sample_spec);
+ pa_strbuf_printf(buf, "Default sample spec: %s\n", s);
+
+ pa_strbuf_printf(buf, "Default sink name: %s\n"
+ "Default source name: %s\n",
+ pa_namereg_get_default_sink_name(c),
+ pa_namereg_get_default_source_name(c));
+
return 0;
}