aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-10-21 05:57:51 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-10-22 19:23:18 +0200
commit91b48c09de7461144ec7d7ec91cddcb3cc60e614 (patch)
treee6a0ccbf073df4ece7562e731f23323138b5c1b2
parent5e14471eb6ccfc2210b82043f611eeba0d3f81f2 (diff)
TV: Fix case where no SDR nor wave file has been selected
-rw-r--r--src/tv/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tv/main.c b/src/tv/main.c
index 911d1e5..a107d53 100644
--- a/src/tv/main.c
+++ b/src/tv/main.c
@@ -288,7 +288,12 @@ static void tx_bas(sample_t *sample_bas, __attribute__((__unused__)) sample_t *s
float *buff = NULL;
void *sdr = NULL;
int latspl = samplerate * latency / 1000;
- float *sendbuff;
+ float *sendbuff = NULL;
+
+ if ((sdr_config->uhd == 0 && sdr_config->soapy == 0)) {
+ fprintf(stderr, "You must choose SDR API you want: --sdr-uhd or --sdr-soapy or -w <file> to generate wave file.\n");
+ goto error;
+ }
sendbuff = calloc(latspl * 2, sizeof(*sendbuff));
if (!sendbuff) {