summaryrefslogtreecommitdiff
path: root/gr-analog/lib
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-04-10 11:40:13 +0100
committerMarcus Müller <marcus@hostalia.de>2020-04-10 16:27:57 +0200
commit78955a24c6c24f92f7b22ab9223e8e0b60b1dc4b (patch)
tree09984db7dd2309ebfdb567f3fc3d8c72f42936a0 /gr-analog/lib
parent55b6b2724ae872b36dd93c1479a829bb4054bdda (diff)
runtime: Use nanosecond resolution for default random seed
This exposed some missing forwarding of RNG seed from one object to another, also fixed in this commit.
Diffstat (limited to 'gr-analog/lib')
-rw-r--r--gr-analog/lib/fastnoise_source_impl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gr-analog/lib/fastnoise_source_impl.cc b/gr-analog/lib/fastnoise_source_impl.cc
index b0ad85d769..a8d6d91650 100644
--- a/gr-analog/lib/fastnoise_source_impl.cc
+++ b/gr-analog/lib/fastnoise_source_impl.cc
@@ -59,7 +59,8 @@ fastnoise_source_impl<T>::fastnoise_source_impl(noise_type_t type,
io_signature::make(0, 0, 0),
io_signature::make(1, 1, sizeof(T))),
d_type(type),
- d_ampl(ampl)
+ d_ampl(ampl),
+ d_rng(seed)
{
d_samples.resize(samples);
xoroshiro128p_seed(d_state, (uint64_t)seed);
@@ -76,7 +77,8 @@ fastnoise_source_impl<gr_complex>::fastnoise_source_impl(noise_type_t type,
io_signature::make(0, 0, 0),
io_signature::make(1, 1, sizeof(gr_complex))),
d_type(type),
- d_ampl(ampl / sqrtf(2.0f))
+ d_ampl(ampl / sqrtf(2.0f)),
+ d_rng(seed)
{
d_samples.resize(samples);
xoroshiro128p_seed(d_state, (uint64_t)seed);