From 80d750323fae7b98a1890c7d3a83407efb36866a Mon Sep 17 00:00:00 2001 From: Mark Hills Date: Sat, 21 Jul 2012 13:32:40 +0100 Subject: [PATCH] Updates --- notice.h | 6 ++++++ rx.c | 8 +++++++- tx.c | 5 +++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 notice.h diff --git a/notice.h b/notice.h new file mode 100644 index 0000000..adc2d94 --- /dev/null +++ b/notice.h @@ -0,0 +1,6 @@ +#ifndef NOTICE_H +#define NOTICE_H + +#define COPYRIGHT "(C) Copyright 2009 Mark Hills " + +#endif diff --git a/rx.c b/rx.c index e3e2e3a..bc8c062 100644 --- a/rx.c +++ b/rx.c @@ -8,6 +8,7 @@ #include "defaults.h" #include "device.h" +#include "notice.h" #include "sched.h" static unsigned int verbose = DEFAULT_VERBOSE; @@ -153,10 +154,12 @@ int main(int argc, char *argv[]) channels = DEFAULT_CHANNELS, port = DEFAULT_PORT; + fputs("rx " COPYRIGHT "\n", stderr); + for (;;) { int c; - c = getopt(argc, argv, "d:h:j:m:p:v:"); + c = getopt(argc, argv, "d:f:h:j:m:p:v:"); if (c == -1) break; @@ -164,6 +167,9 @@ int main(int argc, char *argv[]) case 'd': device = optarg; break; + case 'f': + frame = atoi(optarg); + break; case 'h': addr = optarg; break; diff --git a/tx.c b/tx.c index 6687391..421ba48 100644 --- a/tx.c +++ b/tx.c @@ -8,6 +8,7 @@ #include "defaults.h" #include "device.h" +#include "notice.h" #include "sched.h" static unsigned int verbose = DEFAULT_VERBOSE; @@ -139,6 +140,8 @@ int main(int argc, char *argv[]) kbps = DEFAULT_BITRATE, port = DEFAULT_PORT; + fputs("tx " COPYRIGHT "\n", stderr); + for (;;) { int c; @@ -194,9 +197,7 @@ int main(int argc, char *argv[]) fputs("CELT_SET_PREDICTION failed\n", stderr); return -1; } - bytes_per_frame = kbps * 1024 * frame / rate / 8; - fprintf(stderr, "bytes_per_frame = %d\n", bytes_per_frame); if (go_realtime() != 0) return -1;