mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-11-06 10:47:35 +01:00
print out exact sample rate only if needed
This commit is contained in:
parent
94c47189d4
commit
2b0d5963b7
@ -519,7 +519,9 @@ int rtlsdr_set_sample_rate(rtlsdr_dev_t *dev, uint32_t samp_rate)
|
||||
rsamp_ratio &= ~3;
|
||||
|
||||
real_rate = (CRYSTAL_FREQ * pow(2, 22)) / rsamp_ratio;
|
||||
fprintf(stderr, "Setting sample rate: %.3f Hz\n", real_rate);
|
||||
|
||||
if ( ((double)samp_rate) != real_rate )
|
||||
fprintf(stderr, "Exact sample rate: %f Hz\n", real_rate);
|
||||
|
||||
if (dev->tuner)
|
||||
dev->tuner->set_bw((void *)dev, real_rate);
|
||||
|
Loading…
Reference in New Issue
Block a user