diff options
author | Luke Berndt <lukekb@gmail.com> | 2023-01-14 16:06:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-14 16:06:45 -0500 |
commit | 4c84e250c06f0f6cdfb04145767e3dc32c26f07b (patch) | |
tree | a34b957dd2301b3c1f0d69744048dff94fb83c71 | |
parent | 3f036e0c6f69bd883a54a8cb96f07257602a07c2 (diff) | |
parent | b36cb5813d9bd0319964d0dc9deffcbfa2a6d6d2 (diff) |
Merge pull request #753 from aaknitt/fix_sample_rate
adjust Source sample rate to match SDR sample rate
-rw-r--r-- | trunk-recorder/source.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/trunk-recorder/source.cc b/trunk-recorder/source.cc index 27c980f3..ac197824 100644 --- a/trunk-recorder/source.cc +++ b/trunk-recorder/source.cc @@ -475,6 +475,7 @@ Source::Source(double c, double r, double e, std::string drv, std::string dev, C BOOST_LOG_TRIVIAL(info) << "Setting sample rate to: " << FormatSamplingRate(rate); osmo_src->set_sample_rate(rate); actual_rate = osmo_src->get_sample_rate(); + rate = round(actual_rate); BOOST_LOG_TRIVIAL(info) << "Actual sample rate: " << FormatSamplingRate(actual_rate); BOOST_LOG_TRIVIAL(info) << "Tuning to " << format_freq(center + error); osmo_src->set_center_freq(center + error, 0); |