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
6187f182d5
commit
884ee47605
|
@ -66,7 +66,8 @@ osmosdr_make_sink_c (const std::string &args)
|
|||
osmosdr_sink_c_impl::osmosdr_sink_c_impl (const std::string &args)
|
||||
: gr_hier_block2 ("osmosdr_sink_c_impl",
|
||||
args_to_io_signature(args),
|
||||
gr_make_io_signature (0, 0, 0))
|
||||
gr_make_io_signature (0, 0, 0)),
|
||||
_sample_rate(NAN)
|
||||
{
|
||||
size_t channel = 0;
|
||||
bool device_specified = false;
|
||||
|
|
|
@ -75,6 +75,7 @@ private:
|
|||
|
||||
std::vector< osmosdr_snk_iface * > _devs;
|
||||
|
||||
/* cache to prevent multiple device calls with the same value coming from grc */
|
||||
double _sample_rate;
|
||||
std::map< size_t, double > _center_freq;
|
||||
std::map< size_t, double > _freq_corr;
|
||||
|
|
|
@ -91,7 +91,8 @@ osmosdr_make_source_c (const std::string &args)
|
|||
osmosdr_source_c_impl::osmosdr_source_c_impl (const std::string &args)
|
||||
: gr_hier_block2 ("osmosdr_source_c_impl",
|
||||
gr_make_io_signature (0, 0, 0),
|
||||
args_to_io_signature(args))
|
||||
args_to_io_signature(args)),
|
||||
_sample_rate(NAN)
|
||||
{
|
||||
size_t channel = 0;
|
||||
bool device_specified = false;
|
||||
|
|
|
@ -82,6 +82,7 @@ private:
|
|||
|
||||
std::vector< osmosdr_src_iface * > _devs;
|
||||
|
||||
/* cache to prevent multiple device calls with the same value coming from grc */
|
||||
double _sample_rate;
|
||||
std::map< size_t, double > _center_freq;
|
||||
std::map< size_t, double > _freq_corr;
|
||||
|
|
Loading…
Reference in New Issue