From 93c8fe6577b59176ed6a54a1ae98f8749f122dc8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 7 Sep 2004 14:58:42 +0000 Subject: 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 --- polyp/cli-command.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'polyp/cli-command.c') 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; } -- cgit