Minimum frequency must be 8000 Hz

This commit is contained in:
Andreas Eversberg 2019-05-30 18:19:06 +02:00
parent 8c6f78fd63
commit 37406db7e3
1 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,12 @@ int sender_create(sender_t *sender, int kanal, double sendefrequenz, double empf
if (use_sdr) if (use_sdr)
sender->rx_gain = 1.0; sender->rx_gain = 1.0;
if (samplerate < 8000) {
PDEBUG(DSENDER, DEBUG_NOTICE, "Given sample rate is below 8 KHz. Please use higher sample rate!\n");
rc = -EINVAL;
goto error;
}
PDEBUG_CHAN(DSENDER, DEBUG_DEBUG, "Creating 'Sender' instance\n"); PDEBUG_CHAN(DSENDER, DEBUG_DEBUG, "Creating 'Sender' instance\n");
/* if we find a channel that uses the same device as we do, /* if we find a channel that uses the same device as we do,