1
0
mirror of http://www.pogo.org.uk/~mark/trx.git synced 2024-11-24 03:15:05 +01:00
This commit is contained in:
Mark Hills 2012-07-21 13:32:40 +01:00
parent 844fbf03a8
commit 80d750323f
3 changed files with 16 additions and 3 deletions

6
notice.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef NOTICE_H
#define NOTICE_H
#define COPYRIGHT "(C) Copyright 2009 Mark Hills <mark@pogo.org.uk>"
#endif

8
rx.c
View File

@ -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;

5
tx.c
View File

@ -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;