commit 513e4e6e4ab90ee8750195b6db7af724501b3250
parent c09329761e577aeca1c801974a55d9332be83f77
Author: sin <sin@2f30.org>
Date: Fri, 10 Jun 2016 19:26:30 +0100
Draw a status bar for input channel/monitor state
Cross-fader position/step and master/monitor output status
not yet printed.
Diffstat:
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/ncmixer.c b/ncmixer.c
@@ -299,12 +299,18 @@ server_listen(char *name)
void
draw_status(void)
{
- printw("ch0_monitor: %d\n", inputs[0].monitor);
- printw("ch1_monitor: %d\n", inputs[1].monitor);
- printw("ch0_connected: %d\n", inputs[0].clifd != -1);
- printw("ch1_connected: %d\n", inputs[1].clifd != -1);
- printw("step: %0.6f\n", step);
- printw("pos: %0.6f\n", xfpos);
+ int offs;
+
+ move(0, 2);
+ clrtoeol();
+ printw("[CH0:%c] [MON:%c]",
+ inputs[0].clifd != -1 ? '*' : ' ',
+ inputs[0].monitor != 0 ? '*' : ' ');
+ offs = ISODD(COLS) ? 2 : 3;
+ move(0, COLS - strlen("[MON: ] [CH1: ]") - offs);
+ printw("[MON:%c] [CH1:%c]",
+ inputs[1].monitor != 0 ? '*' : ' ',
+ inputs[1].clifd != -1 ? '*' : ' ');
}
void
@@ -340,9 +346,8 @@ draw_xfader(void)
void
draw(void)
{
- move(0, 0);
draw_status();
- printw("\n");
+ printw("\n\n");
draw_xfader();
refresh();
}