diff options
-rwxr-xr-x | ztmonitor.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ztmonitor.c b/ztmonitor.c index a579146..2f9a39b 100755 --- a/ztmonitor.c +++ b/ztmonitor.c @@ -58,6 +58,8 @@ static FILE* ofh = 0; static int stereo = 0; +static int verbose = 0; + int audio_open(void) { int fd; @@ -233,6 +235,8 @@ void visualize(short *tx, short *rx, int cnt) draw_bar(rxbest, rxmax); printf(" "); draw_bar(txbest, txmax); + if (verbose) + printf(" Rx: %5d (%5d) Tx: %5d (%5d)", rxbest, rxmax, txbest, txmax); txbest = 0; rxbest = 0; @@ -261,13 +265,18 @@ int main(int argc, char *argv[]) struct zt_confinfo zc; if ((argc < 2) || (atoi(argv[1]) < 1)) { - fprintf(stderr, "Usage: ztmonitor <channel num> [-v] [-f FILE]\n"); + fprintf(stderr, "Usage: ztmonitor <channel num> [-v[v]] [-f FILE]\n"); exit(1); } for (i = 2; i < argc; ++i) { - if (!strcmp(argv[i], "-v")) + if (!strcmp(argv[i], "-v")) { + if (visual) + verbose = 1; visual = 1; - else if (!strcmp(argv[i], "-f") && (i+1) < argc) { + } else if (!strcmp(argv[i], "-vv")) { + visual = 1; + verbose = 1; + } else if (!strcmp(argv[i], "-f") && (i+1) < argc) { ++i; /*we care about hte file name */ if (strlen(argv[i]) < 255 ) { strcpy(output_file, argv[i]); |