ncmixer

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

commit a7a7980ef3fe226a803216fd40e40df3349d1344
parent 8f2256e6946f654b8010b238d4f779e97cd61a72
Author: sin <sin@2f30.org>
Date:   Thu Jun  9 15:26:05 +0100

Factor out status drawing to a separate function

Diffstat:
ncmixer.c | 18++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/ncmixer.c b/ncmixer.c @@ -314,6 +314,17 @@ 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); +} + +void draw_xfader(void) { int start, end, len, center, pos, i; @@ -346,12 +357,7 @@ void draw(void) { move(0, 0); - 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); + draw_status(); printw("\n"); draw_xfader(); refresh();