aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/main_common.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-07-09 19:17:37 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-07-15 07:38:16 +0200
commit538b4a42ec0925cbd764ab8733bc1639d4221107 (patch)
treec2f5c9e9401549fed13527fdc456e40a8e3cb0c9 /src/common/main_common.c
parentaa20d4e50e28b6d4fb1d00a2fef43e513514593b (diff)
Add wave file playback to replace TX audio
Diffstat (limited to 'src/common/main_common.c')
-rw-r--r--src/common/main_common.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/common/main_common.c b/src/common/main_common.c
index 4bc20ee..20d384f 100644
--- a/src/common/main_common.c
+++ b/src/common/main_common.c
@@ -62,6 +62,7 @@ int rt_prio = 0;
const char *write_rx_wave = NULL;
const char *write_tx_wave = NULL;
const char *read_rx_wave = NULL;
+const char *read_tx_wave = NULL;
int use_sdr = 0;
int sdr_channel = 0;
static const char *sdr_args = "";
@@ -135,6 +136,8 @@ void print_help_common(const char *arg0, const char *ext_usage)
printf(" Write transmitted audio to given wave file.\n");
printf(" --read-rx-wave <file>\n");
printf(" Replace received audio by given wave file.\n");
+ printf(" --read-tx-wave <file>\n");
+ printf(" Replace transmitted audio by given wave file.\n");
#ifdef HAVE_SDR
printf("\nSDR options:\n");
#ifdef HAVE_UHD
@@ -185,8 +188,9 @@ void print_hotkeys_common(void)
#define OPT_WRITE_RX_WAVE 1001
#define OPT_WRITE_TX_WAVE 1002
#define OPT_READ_RX_WAVE 1003
-#define OPT_CALL_SAMPLERATE 1004
-#define OPT_MNCC_NAME 1005
+#define OPT_READ_TX_WAVE 1004
+#define OPT_CALL_SAMPLERATE 1005
+#define OPT_MNCC_NAME 1006
#define OPT_SDR_UHD 1100
#define OPT_SDR_SOAPY 1101
@@ -222,6 +226,7 @@ static struct option long_options_common[] = {
{"write-rx-wave", 1, 0, OPT_WRITE_RX_WAVE},
{"write-tx-wave", 1, 0, OPT_WRITE_TX_WAVE},
{"read-rx-wave", 1, 0, OPT_READ_RX_WAVE},
+ {"read-tx-wave", 1, 0, OPT_READ_TX_WAVE},
{"sdr-uhd", 0, 0, OPT_SDR_UHD},
{"sdr-soapy", 0, 0, OPT_SDR_SOAPY},
{"sdr-channel", 1, 0, OPT_SDR_CHANNEL},
@@ -380,6 +385,10 @@ void opt_switch_common(int c, char *arg0, int *skip_args)
read_rx_wave = strdup(optarg);
*skip_args += 2;
break;
+ case OPT_READ_TX_WAVE:
+ read_tx_wave = strdup(optarg);
+ *skip_args += 2;
+ break;
case OPT_SDR_UHD:
#ifdef HAVE_SDR
use_sdr = 1;