mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-05 22:34:56 +01:00
Amend 55211b8d (PRNG seed, use local address)
This commit is contained in:
parent
baf5a13f17
commit
b4b4745bd4
1 changed files with 4 additions and 3 deletions
|
|
@ -25,11 +25,12 @@
|
|||
using namespace PBD;
|
||||
|
||||
PCGRand::PCGRand ()
|
||||
: _state (0)
|
||||
, _foo (0)
|
||||
{
|
||||
int foo = 0;
|
||||
uint64_t initseq = (intptr_t)&foo;
|
||||
_state = 0;
|
||||
uint64_t initseq = (intptr_t)&_foo;
|
||||
_inc = (initseq << 1) | 1;
|
||||
|
||||
rand_u32 ();
|
||||
_state += time (NULL) ^ (intptr_t)this;
|
||||
rand_u32 ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue