don't mis-initialize random number generator with default value
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1615 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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 != "" )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user