aboutsummaryrefslogtreecommitdiffstats
path: root/lib/soapy/soapy_sink_c.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/soapy/soapy_sink_c.cc')
-rw-r--r--lib/soapy/soapy_sink_c.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/soapy/soapy_sink_c.cc b/lib/soapy/soapy_sink_c.cc
index 9e3c364..1af5a65 100644
--- a/lib/soapy/soapy_sink_c.cc
+++ b/lib/soapy/soapy_sink_c.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2015-2016 Josh Blum <josh@joshknows.com>
+ * Copyright 2015-2017 Josh Blum <josh@joshknows.com>
* Copyright 2013 Dimitri Stolnikov <horiz0n@gmx.net>
*
* GNU Radio is free software; you can redistribute it and/or modify
@@ -38,17 +38,12 @@
#include "arg_helpers.h"
#include "soapy_sink_c.h"
+#include "soapy_common.h"
#include <SoapySDR/Device.hpp>
#include <SoapySDR/Version.hpp>
using namespace boost::assign;
-boost::mutex &get_soapy_maker_mutex(void)
-{
- static boost::mutex m;
- return m;
-}
-
/*
* Create a new instance of soapy_sink_c and return
* a boost shared_ptr. This is effectively the public constructor.
@@ -185,14 +180,14 @@ std::vector<std::string> soapy_sink_c::get_gain_names( size_t chan)
osmosdr::gain_range_t soapy_sink_c::get_gain_range( size_t chan)
{
SoapySDR::Range r = _device->getGainRange(SOAPY_SDR_TX, chan);
- return osmosdr::gain_range_t(r.minimum(), r.maximum(), 1.0);
+ return soapy_range_to_gain_range(r);
}
osmosdr::gain_range_t soapy_sink_c::get_gain_range( const std::string & name,
size_t chan)
{
SoapySDR::Range r = _device->getGainRange(SOAPY_SDR_TX, chan, name);
- return osmosdr::gain_range_t(r.minimum(), r.maximum(), 1.0);
+ return soapy_range_to_gain_range(r);
}
bool soapy_sink_c::set_gain_mode( bool automatic, size_t chan)