forked from sdr/gr-osmosdr
source/sink: initialize sample rate cache variable
Thanks to Jiří Pinkava for bringing this up.
This commit is contained in:
parent
d335280b2e
commit
e303948ffb
|
@ -65,7 +65,8 @@ osmosdr::sink::make( const std::string &args )
|
||||||
sink_impl::sink_impl( const std::string &args )
|
sink_impl::sink_impl( const std::string &args )
|
||||||
: gr::hier_block2 ("sink_impl",
|
: gr::hier_block2 ("sink_impl",
|
||||||
args_to_io_signature(args),
|
args_to_io_signature(args),
|
||||||
gr::io_signature::make(0, 0, 0))
|
gr::io_signature::make(0, 0, 0)),
|
||||||
|
_sample_rate(NAN)
|
||||||
{
|
{
|
||||||
size_t channel = 0;
|
size_t channel = 0;
|
||||||
bool device_specified = false;
|
bool device_specified = false;
|
||||||
|
|
|
@ -71,6 +71,7 @@ public:
|
||||||
private:
|
private:
|
||||||
std::vector< sink_iface * > _devs;
|
std::vector< sink_iface * > _devs;
|
||||||
|
|
||||||
|
/* cache to prevent multiple device calls with the same value coming from grc */
|
||||||
double _sample_rate;
|
double _sample_rate;
|
||||||
std::map< size_t, double > _center_freq;
|
std::map< size_t, double > _center_freq;
|
||||||
std::map< size_t, double > _freq_corr;
|
std::map< size_t, double > _freq_corr;
|
||||||
|
|
|
@ -91,7 +91,8 @@ osmosdr::source::make( const std::string &args )
|
||||||
source_impl::source_impl( const std::string &args )
|
source_impl::source_impl( const std::string &args )
|
||||||
: gr::hier_block2 ("source_impl",
|
: gr::hier_block2 ("source_impl",
|
||||||
gr::io_signature::make(0, 0, 0),
|
gr::io_signature::make(0, 0, 0),
|
||||||
args_to_io_signature(args))
|
args_to_io_signature(args)),
|
||||||
|
_sample_rate(NAN)
|
||||||
{
|
{
|
||||||
size_t channel = 0;
|
size_t channel = 0;
|
||||||
bool device_specified = false;
|
bool device_specified = false;
|
||||||
|
|
|
@ -78,6 +78,7 @@ public:
|
||||||
private:
|
private:
|
||||||
std::vector< source_iface * > _devs;
|
std::vector< source_iface * > _devs;
|
||||||
|
|
||||||
|
/* cache to prevent multiple device calls with the same value coming from grc */
|
||||||
double _sample_rate;
|
double _sample_rate;
|
||||||
std::map< size_t, double > _center_freq;
|
std::map< size_t, double > _center_freq;
|
||||||
std::map< size_t, double > _freq_corr;
|
std::map< size_t, double > _freq_corr;
|
||||||
|
|
Loading…
Reference in New Issue