RE: [linux-audio-dev] LADSPA Update (http://www.ladspa.org)

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: RE: [linux-audio-dev] LADSPA Update (http://www.ladspa.org)
From: Richard W.E. Furse (richard_AT_muse.demon.co.uk)
Date: Mon May 22 2000 - 01:56:56 EEST


I agree: my instinct is that it really isn't the business of a plugin (or
any other library) to call srand() - for all it knows the host may be
trying to reproduce a pseudo-random sequence. This is probably something
for the supporting docs...

-- Richard

-----Original Message-----
From: David Benson [SMTP:daveb_AT_idealab.com]
Sent: Sunday, May 21, 2000 5:51 PM
To: Benno Senoner
Cc: Juhana Sadeharju; linux-audio-dev_AT_ginette.musique.umontreal.ca
Subject: Re: [linux-audio-dev] LADSPA Update (http://www.ladspa.org)

> I think that the interference is not that big as you think.
> IMHO it is not a big deal if only one or multiple plugins call
> srand() at init time, with a seed based on the current time.
> ( time() )

Many batch jobs can be run in one second. Based on this,
srand(time()) is not so great. A host (or plugin) can
produce a more tweaked seed (eg time() ^ (getpid()<<16))
but basically the optimal seed generator varies host-to-host.
(sucking a seed from /dev/random would be better still,
but less portable)

Furthermore, it might be nice to add a --seed option to hosts
to get reproducible results.
[...]


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon May 22 2000 - 02:31:32 EEST