Cleanup SDR usage when no channel, but full spectrum is used.

Radio and TV uses full spectrum, so they set channels to 0, this will
define a center frequency only. The spectrum is then processed by the
applications and not by libsdr.

The sample rate must be a factor of 1e9, so that time stamps work
and signal has no gaps/glitchs.
This commit is contained in:
Andreas Eversberg
2021-12-05 12:46:19 +01:00
parent 726453909c
commit 2d23c841a6
4 changed files with 17 additions and 16 deletions

View File

@@ -99,7 +99,7 @@ int soapy_open(size_t channel, const char *_device_args, const char *_stream_arg
use_time_stamps = timestamps;
if (use_time_stamps && (1000000000LL % (long long)rate)) {
PDEBUG(DSOAPY, DEBUG_ERROR, "The given sample duration is not a multiple of a nano second. I.e. we can't divide 1000,000,000 by sample rate of %.0f. Please choose a different sample rate for time stamp support!\n", rate);
PDEBUG(DSOAPY, DEBUG_ERROR, "The given sample duration is not a multiple of a nano second. I.e. we can't divide 10^9 by sample rate of %.0f. Please choose a different sample rate for time stamp support!\n", rate);
use_time_stamps = 0;
}
Ns_per_sample = 1000000000LL / (long long)rate;