From aa69825f5413a3a213a8cd557b5e9f24793dad5f Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 22 Nov 2014 21:15:56 +0100 Subject: [PATCH] Added Compress output and its controls --- ursaryd.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ursaryd.c b/ursaryd.c index a0f1911..0315c34 100644 --- a/ursaryd.c +++ b/ursaryd.c @@ -23,7 +23,7 @@ * rotary red button green button * 0 sink Ursarium mute select as default (or assign to client selected by touch) * 1 sink Catarium mute dtto - * 2 - - - + * 2 sink Compress - dtto * 3 - - - * 4 MPD mute play/pause/stop * 5 Albireo mute - @@ -288,16 +288,25 @@ static void update_default_sink(void) { noct_set_button(8, 1); noct_set_button(9, 0); + noct_set_button(10, 0); } else if (!strcmp(sink, "catarium")) { noct_set_button(8, 0); noct_set_button(9, 1); + noct_set_button(10, 0); + } + else if (!strcmp(sink, "compress")) + { + noct_set_button(8, 0); + noct_set_button(9, 0); + noct_set_button(10, 1); } else { noct_set_button(8, 0); noct_set_button(9, 0); + noct_set_button(10, 0); } } @@ -328,6 +337,13 @@ static void update_default_sink_from_button(int button, int on) else switch_to = "catarium"; } + else if (button == 10) + { + if (!strcmp(sink, "compress")) + switch_to = "burrow"; + else + switch_to = "compress"; + } if (!switch_to) return; @@ -601,6 +617,7 @@ void notify_button(int button, int on) break; case 8: case 9: + case 10: update_default_sink_from_button(button, on); break; case 12: -- 2.39.2