diff options
Diffstat (limited to 'src/libdisplay/display_wave.c')
-rw-r--r-- | src/libdisplay/display_wave.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/libdisplay/display_wave.c b/src/libdisplay/display_wave.c index 8932960..b5d71a6 100644 --- a/src/libdisplay/display_wave.c +++ b/src/libdisplay/display_wave.c @@ -24,7 +24,7 @@ #include <math.h> #include <sys/ioctl.h> #include "../libsample/sample.h" -#include "../libdebug/debug.h" +#include "../liblogging/logging.h" #include "../libdisplay/display.h" #define HEIGHT 11 @@ -52,6 +52,8 @@ void display_wave_on(int on) if (wave_on) { memset(&screen, ' ', sizeof(screen)); + lock_logging(); + enable_limit_scroll(false); printf("\0337\033[H"); for (i = 0; i < num_sender; i++) { for (j = 0; j < HEIGHT; j++) { @@ -60,6 +62,8 @@ void display_wave_on(int on) } } printf("\0338"); fflush(stdout); + enable_limit_scroll(true); + unlock_logging(); } if (on < 0) @@ -68,9 +72,9 @@ void display_wave_on(int on) wave_on = on; if (wave_on) - debug_limit_scroll = HEIGHT * num_sender; + logging_limit_scroll_top(HEIGHT * num_sender); else - debug_limit_scroll = 0; + logging_limit_scroll_top(0); } /* @@ -202,8 +206,10 @@ void display_wave(dispwav_t *disp, sample_t *samples, int length, double range) screen[k][j] = '|'; } } - sprintf(screen[0], "(chan %s", disp->kanal); - *strchr(screen[0], '\0') = ')'; + sprintf(screen[0], "Channel: %s", disp->kanal); + *strchr(screen[0], '\0') = ' '; + lock_logging(); + enable_limit_scroll(false); printf("\0337\033[H"); for (j = 0; j < disp->offset; j++) puts(""); @@ -237,6 +243,8 @@ void display_wave(dispwav_t *disp, sample_t *samples, int length, double range) } /* reset color and position */ printf("\033[0;39m\0338"); fflush(stdout); + enable_limit_scroll(true); + unlock_logging(); } } |