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) {