ncmixer

ncurses audio mixer for DJ'ing
git clone git://git.2f30.org/ncmixer.git
Log | Files | Refs | README | LICENSE

commit 46aea8edbcdcc325650f8bd2ece59be9d37d6919
parent 70bbc7c9632cebe3b6b08a38a24926099e5dd9b9
Author: lostd <lostd@2f30.org>
Date:   Sat Jun 11 11:48:43 +0100

Display output liveness indicators

Diffstat:
ncmixer.c | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/ncmixer.c b/ncmixer.c @@ -403,12 +403,29 @@ draw_xfader(void) } void +draw_outputs(void) +{ + int start, end, len, center; + + start = 2; + end = ISODD(COLS) ? COLS - 2 : COLS - 3; + len = end - start; + center = start + (len / 2); + + move(getcury(stdscr), center - strlen(" master: off") / 2); + printw(" master: %s\n", outputs[0].sio_hdl ? "on" : "off"); + move(getcury(stdscr), center - strlen("monitor: off") / 2); + printw("monitor: %s\n", outputs[1].sio_hdl ? "on" : "off"); +} + +void draw(void) { erase(); draw_status(); draw_xfader(); draw_levels(); + draw_outputs(); refresh(); }