diff --git a/plugins/ladspa_effect/caps/interface.cc b/plugins/ladspa_effect/caps/interface.cc index f660f7ba6..d0c97e831 100644 --- a/plugins/ladspa_effect/caps/interface.cc +++ b/plugins/ladspa_effect/caps/interface.cc @@ -54,14 +54,14 @@ #define N 38 static DescriptorStub * descriptors [N]; -static inline void +/*static inline void seed() { static struct timeval tv; gettimeofday (&tv, 0); srand (tv.tv_sec ^ tv.tv_usec); -} +}*/ extern "C" { diff --git a/plugins/ladspa_effect/tap/tap_pinknoise.c b/plugins/ladspa_effect/tap/tap_pinknoise.c index 4738f2867..4a55628e4 100644 --- a/plugins/ladspa_effect/tap/tap_pinknoise.c +++ b/plugins/ladspa_effect/tap/tap_pinknoise.c @@ -239,7 +239,7 @@ __attribute__((constructor)) _init() { exit(1); /* initialize RNG */ - srand(time(0)); +// srand(time(0)); mono_descriptor->UniqueID = ID_MONO; mono_descriptor->Label = strdup("tap_pinknoise"); diff --git a/src/core/drumsynth.cpp b/src/core/drumsynth.cpp index 6d84c5697..df02d52c0 100644 --- a/src/core/drumsynth.cpp +++ b/src/core/drumsynth.cpp @@ -344,7 +344,7 @@ int DrumSynth::GetDSFileSamples(const char *dsfile, int16_t *&wave, int channels { a = 1.f; b = -NT / 50.f; c = (float)fabs((float)NT) / 100.f; g = NL; } //if(GetPrivateProfileInt(sec,"FixedSeq",0,dsfile)!=0) - srand(1); //fixed random sequence + //srand(1); //fixed random sequence //read tone parameters strcpy(sec, "Tone"); diff --git a/src/core/main.cpp b/src/core/main.cpp index 6aecbc216..8594ef146 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -378,6 +378,10 @@ int main( int argc, char * * argv ) delete ss; + // re-intialize RNG - shared libraries might have srand() or + // srandom() calls in their init procedure + srand( getpid() + time( 0 ) ); + // we try to load given file if( file_to_load != "" ) {