Move unncessary buffer in radio

master
Ismael Gomez 4 years ago committed by Xavier Arteaga
parent c4080e35cc
commit 1bd3e76f98

@ -644,13 +644,14 @@ void radio::set_rx_gain_th(const float& gain)
void radio::set_rx_srate(const double& srate) void radio::set_rx_srate(const double& srate)
{ {
std::unique_lock<std::mutex> lock(rx_mutex);
if (!is_initialized) { if (!is_initialized) {
return; return;
} }
// If fix sampling rate... // If fix sampling rate...
if (std::isnormal(fix_srate_hz)) { if (std::isnormal(fix_srate_hz)) {
std::unique_lock<std::mutex> lock(rx_mutex);
// If the sampling rate was not set, set it // If the sampling rate was not set, set it
if (not std::isnormal(cur_rx_srate)) { if (not std::isnormal(cur_rx_srate)) {
for (srslte_rf_t& rf_device : rf_devices) { for (srslte_rf_t& rf_device : rf_devices) {

Loading…
Cancel
Save