diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-09-12 16:26:44 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2020-09-12 16:26:44 -0700 |
commit | 643148737f38151d7bfdec1ad45718f5616e0ac9 (patch) | |
tree | 1410ed308bf8caae9eaa63e81efd6dac899b9e26 /README | |
parent | c8e59d7361931ad2a3f3ba5911d7250a36bf4dfc (diff) |
modules/spiro: use ticks instead of time() w/srand
time() only changes every second, so this had the effect of freezing
the seed a second at a time, affecting all rand() users, when spiro's
create_context() was called more frequently than 1HZ.
When using rtv with channels=spiro,duration=0 the create_context() gets
called every other frame, and the visual results were very broken with
the spiro only actually reseeding every second and the snow between each
frame being static since it too uses rand() for seeding itself.
This whole situation suggests no module should be calling srand(), and
instead rototiller should probably call srand() once at startup and any
modules that wish to use rand with a different seed should use rand_r(),
and maybe rand() just for acquiring the seed like modules/snow does.
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions