aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Gomizelj <simongmzlj@gmail.com>2012-08-11 01:44:46 -0400
committerSimon Gomizelj <simongmzlj@gmail.com>2012-08-11 03:29:08 -0400
commitef12a05e776bca757142ebe5cc51c94b3752e47f (patch)
tree33f71f3dd7556a75aaa2891908a4bffc0d812b0d
parentba40440203a293192ec8858df6c5e0f137494298 (diff)
downloadmirror-ponymix-ef12a05e776bca757142ebe5cc51c94b3752e47f.tar.gz
mirror-ponymix-ef12a05e776bca757142ebe5cc51c94b3752e47f.tar.bz2
mirror-ponymix-ef12a05e776bca757142ebe5cc51c94b3752e47f.zip
make the list action output sources too
-rw-r--r--pulsemix.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pulsemix.c b/pulsemix.c
index 6741a09..ed63cbd 100644
--- a/pulsemix.c
+++ b/pulsemix.c
@@ -328,6 +328,14 @@ static void get_default_sink(struct pulseaudio_t *pulse)
get_sink_by_name(pulse, sink_name);
}
+static void get_sources(struct pulseaudio_t *pulse)
+{
+ pa_operation *op = pa_context_get_source_info_list(pulse->cxt,
+ source_add_cb, pulse);
+ pulse_async_wait(pulse, op);
+ pa_operation_unref(op);
+}
+
static void get_source_by_name(struct pulseaudio_t *pulse, const char *name)
{
pa_operation *op = pa_context_get_source_info_by_name(pulse->cxt, name,
@@ -538,6 +546,7 @@ int main(int argc, char *argv[])
if (verb == ACTION_LIST) {
get_sinks(&pulse);
+ get_sources(&pulse);
print_all(&pulse);
} else {
/* determine sink */