diff options
Diffstat (limited to 'lib/soapy/soapy_sink_c.cc')
-rw-r--r-- | lib/soapy/soapy_sink_c.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/soapy/soapy_sink_c.cc b/lib/soapy/soapy_sink_c.cc index 4aafc47..b12b8da 100644 --- a/lib/soapy/soapy_sink_c.cc +++ b/lib/soapy/soapy_sink_c.cc @@ -63,7 +63,7 @@ soapy_sink_c::soapy_sink_c (const std::string &args) gr::io_signature::make (0, 0, 0)) { { - std::lock_guard<std::mutex> l(get_soapy_maker_mutex()); + boost::mutex::scoped_lock l(get_soapy_maker_mutex()); _device = SoapySDR::Device::make(params_to_dict(args)); } _nchan = std::max(1, args_to_io_signature(args)->max_streams()); @@ -75,7 +75,7 @@ soapy_sink_c::soapy_sink_c (const std::string &args) soapy_sink_c::~soapy_sink_c(void) { _device->closeStream(_stream); - std::lock_guard<std::mutex> l(get_soapy_maker_mutex()); + boost::mutex::scoped_lock l(get_soapy_maker_mutex()); SoapySDR::Device::unmake(_device); } @@ -107,7 +107,7 @@ std::vector<std::string> soapy_sink_c::get_devices() { std::vector<std::string> result; int i = 0; - for (SoapySDR::Kwargs kw : SoapySDR::Device::enumerate()) + BOOST_FOREACH(SoapySDR::Kwargs kw, SoapySDR::Device::enumerate()) { kw["soapy"] = boost::lexical_cast<std::string>(i++); result.push_back(dict_to_args_string(kw)); @@ -124,12 +124,12 @@ osmosdr::meta_range_t soapy_sink_c::get_sample_rates( void ) { osmosdr::meta_range_t result; #ifdef SOAPY_SDR_API_HAS_GET_SAMPLE_RATE_RANGE - for (const SoapySDR::Range &r : _device->getSampleRateRange(SOAPY_SDR_TX, 0)) + BOOST_FOREACH(const SoapySDR::Range &r, _device->getSampleRateRange(SOAPY_SDR_TX, 0)) { result.push_back(osmosdr::range_t(r.minimum(), r.maximum())); } #else - for (const double rate : _device->listSampleRates(SOAPY_SDR_TX, 0)) + BOOST_FOREACH(const double rate, _device->listSampleRates(SOAPY_SDR_TX, 0)) { result.push_back(osmosdr::range_t(rate)); } @@ -151,7 +151,7 @@ double soapy_sink_c::get_sample_rate( void ) osmosdr::freq_range_t soapy_sink_c::get_freq_range( size_t chan) { osmosdr::meta_range_t result; - for (const SoapySDR::Range r : _device->getFrequencyRange(SOAPY_SDR_TX, 0)) + BOOST_FOREACH(const SoapySDR::Range r, _device->getFrequencyRange(SOAPY_SDR_TX, 0)) { result.push_back(osmosdr::range_t(r.minimum(), r.maximum())); } @@ -309,12 +309,12 @@ osmosdr::freq_range_t soapy_sink_c::get_bandwidth_range( size_t chan) { osmosdr::meta_range_t result; #ifdef SOAPY_SDR_API_HAS_GET_BANDWIDTH_RANGE - for (const SoapySDR::Range &r : _device->getBandwidthRange(SOAPY_SDR_TX, 0)) + BOOST_FOREACH(const SoapySDR::Range &r, _device->getBandwidthRange(SOAPY_SDR_TX, 0)) { result.push_back(osmosdr::range_t(r.minimum(), r.maximum())); } #else - for (const double bw : _device->listBandwidths(SOAPY_SDR_TX, 0)) + BOOST_FOREACH(const double bw, _device->listBandwidths(SOAPY_SDR_TX, 0)) { result.push_back(osmosdr::range_t(bw)); } |