From 1bd3e76f98b1576684c2095243406371ded4d115 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Mon, 7 Sep 2020 12:00:46 +0200 Subject: [PATCH] Move unncessary buffer in radio --- lib/src/radio/radio.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index 24f7d536e..3bf8f55bd 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -644,13 +644,14 @@ void radio::set_rx_gain_th(const float& gain) void radio::set_rx_srate(const double& srate) { - std::unique_lock lock(rx_mutex); if (!is_initialized) { return; } // If fix sampling rate... if (std::isnormal(fix_srate_hz)) { + std::unique_lock lock(rx_mutex); + // If the sampling rate was not set, set it if (not std::isnormal(cur_rx_srate)) { for (srslte_rf_t& rf_device : rf_devices) {