diff --git a/notice.h b/notice.h index 48167a0..e950fd8 100644 --- a/notice.h +++ b/notice.h @@ -1,6 +1,6 @@ #ifndef NOTICE_H #define NOTICE_H -#define COPYRIGHT "(C) Copyright 2012 Mark Hills " +#define COPYRIGHT "trx (C) Copyright 2012 Mark Hills " #endif diff --git a/rx.c b/rx.c index 4c3e743..8d0ab4e 100644 --- a/rx.c +++ b/rx.c @@ -105,12 +105,13 @@ static int run_rx(RtpSession *session, static void usage(FILE *fd) { - fprintf(fd, "Usage: rx []\n"); + fprintf(fd, "Usage: rx []\n" + "Real-time audio receiver over IP\n"); fprintf(fd, "\nAudio device (ALSA) parameters:\n"); fprintf(fd, " -d Device name (default '%s')\n", DEFAULT_DEVICE); - fprintf(fd, " -m Buffer time (milliseconds, default %d)\n", + fprintf(fd, " -m Buffer time (default %d milliseconds)\n", DEFAULT_BUFFER); fprintf(fd, "\nNetwork parameters:\n"); @@ -118,11 +119,11 @@ static void usage(FILE *fd) DEFAULT_ADDR); fprintf(fd, " -p UDP port number (default %d)\n", DEFAULT_PORT); - fprintf(fd, " -j Jitter buffer (milliseconds, default %d)\n", + fprintf(fd, " -j Jitter buffer (default %d milliseconds)\n", DEFAULT_JITTER); fprintf(fd, "\nEncoding parameters (must match sender):\n"); - fprintf(fd, " -r Sample rate (default %d)\n", + fprintf(fd, " -r Sample rate (default %dHz)\n", DEFAULT_RATE); fprintf(fd, " -c Number of channels (default %d)\n", DEFAULT_CHANNELS); @@ -148,7 +149,7 @@ int main(int argc, char *argv[]) channels = DEFAULT_CHANNELS, port = DEFAULT_PORT; - fputs("rx " COPYRIGHT "\n", stderr); + fputs(COPYRIGHT "\n", stderr); for (;;) { int c; @@ -156,7 +157,6 @@ int main(int argc, char *argv[]) c = getopt(argc, argv, "c:d:h:j:m:p:v:"); if (c == -1) break; - switch (c) { case 'c': channels = atoi(optarg); diff --git a/tx.c b/tx.c index c041442..0b81619 100644 --- a/tx.c +++ b/tx.c @@ -92,12 +92,13 @@ static int run_tx(snd_pcm_t *snd, static void usage(FILE *fd) { - fprintf(fd, "Usage: tx []\n"); + fprintf(fd, "Usage: tx []\n" + "Real-time audio transmitter over IP\n"); fprintf(fd, "\nAudio device (ALSA) parameters:\n"); fprintf(fd, " -d Device name (default '%s')\n", DEFAULT_DEVICE); - fprintf(fd, " -m Buffer time (milliseconds, default %d)\n", + fprintf(fd, " -m Buffer time (default %d milliseconds)\n", DEFAULT_BUFFER); fprintf(fd, "\nNetwork parameters:\n"); @@ -107,11 +108,11 @@ static void usage(FILE *fd) DEFAULT_PORT); fprintf(fd, "\nEncoding parameters:\n"); - fprintf(fd, " -r Sample rate (default %d)\n", + fprintf(fd, " -r Sample rate (default %dHz)\n", DEFAULT_RATE); fprintf(fd, " -c Number of channels (default %d)\n", DEFAULT_CHANNELS); - fprintf(fd, " -f Frame size (default %d)\n", + fprintf(fd, " -f Frame size (default %d samples, see below)\n", DEFAULT_FRAME); fprintf(fd, " -b Bitrate (approx., default %d)\n", DEFAULT_BITRATE); @@ -119,6 +120,9 @@ static void usage(FILE *fd) fprintf(fd, "\nDisplay parameters:\n"); fprintf(fd, " -v Verbosity level (default %d)\n", DEFAULT_VERBOSE); + + fprintf(fd, "\nAllowed frame sizes (-f) are defined by the Opus codec. For example,\n" + "at 48000Hz the permitted values are 120, 240, 480 or 960.\n"); } int main(int argc, char *argv[]) @@ -139,7 +143,7 @@ int main(int argc, char *argv[]) kbps = DEFAULT_BITRATE, port = DEFAULT_PORT; - fputs("tx " COPYRIGHT "\n", stderr); + fputs(COPYRIGHT "\n", stderr); for (;;) { int c;