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

@@ -393,7 +393,7 @@ int main(int argc, char *argv[])
tx_frequencies[0] = frequency;
rx_frequencies[0] = frequency;
am[0] = 0;
sdr = sdr_open(NULL, tx_frequencies, rx_frequencies, am, 1, 0.0, dsp_samplerate, buffer_size, 1.0, 0.0, 0.0, 0.0);
sdr = sdr_open(NULL, tx_frequencies, rx_frequencies, am, 0, 0.0, dsp_samplerate, buffer_size, 1.0, 0.0, 0.0, 0.0);
if (!sdr)
goto error;
sdr_start(sdr);