diff options
author | Andrej Rode <mail@andrejro.de> | 2018-09-01 03:10:16 +0200 |
---|---|---|
committer | Andrej Rode <mail@andrejro.de> | 2018-09-01 03:10:16 +0200 |
commit | c1f0830231c36f4ac419b25b9fbcab5bae0f2115 (patch) | |
tree | 2543341836565bc1bba9935f47f087ac61a7e015 /gr-analog | |
parent | 1a43ee6b5146118c0ed2ac1a5e2f2271877766e1 (diff) |
analog: fastnoise post-merge cleanup
Diffstat (limited to 'gr-analog')
-rw-r--r-- | gr-analog/lib/fastnoise_source_impl.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gr-analog/lib/fastnoise_source_impl.cc b/gr-analog/lib/fastnoise_source_impl.cc index 9cdea4e50d..fdd0af11f4 100644 --- a/gr-analog/lib/fastnoise_source_impl.cc +++ b/gr-analog/lib/fastnoise_source_impl.cc @@ -29,6 +29,7 @@ #include <gnuradio/xoroshiro128p.h> #include <gnuradio/io_signature.h> #include <stdexcept> +#include <vector> namespace gr { namespace analog { @@ -172,13 +173,14 @@ T fastnoise_source_impl<T>::sample_unbiased() { template <> gr_complex fastnoise_source_impl<gr_complex>::sample_unbiased() { uint64_t random_int = xoroshiro128p_next(d_state); + gr_complex s(sample()); float re = (random_int & (UINT64_C(1)<<23)) ? (- s.real()) : (s.real()); float im = (random_int & (UINT64_C(1)<<42)) ? (- s.real()) : (s.real()); return gr_complex(re, im); } template <class T> -const std::vector<T>& fast_noise_source_impl<T>::samples() const { +const std::vector<T>& fastnoise_source_impl<T>::samples() const { return d_samples; } |