From b420103c9e0c8eaf5bf9c0b040642f08539a487f Mon Sep 17 00:00:00 2001 From: markster Date: Thu, 4 Nov 2004 03:53:37 +0000 Subject: ztmonitor updates git-svn-id: http://svn.digium.com/svn/zaptel/trunk@488 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- ztmonitor.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'ztmonitor.c') 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 [-v] [-f FILE]\n"); + fprintf(stderr, "Usage: ztmonitor [-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]); -- cgit v1.2.3