yoyz / amsynth

Automatically exported from code.google.com/p/amsynth
GNU General Public License v2.0
1 stars 0 forks source link

Randomise isn't properly seeded. #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Hit <Ctrl> + r  and compare the sounds. Same sounds are generated over and 
over again, starting from when amSynth is loaded.

What is the expected output? What do you see instead?
True random sounds.

What version of the product are you using? On what operating system?
amSynth-1.3 / Linuxmint 10

I fixed it by seeding Preset::randomise() with srand(time(NULL)). It should 
maybe be done just once,in the beginning of Main, but I'm happy with it for now 
to just show what I mean. Also, I don't know how to fix it otherwise...  :P

Oskar

Original issue reported on code.google.com by OWallg...@gmail.com on 8 Sep 2012 at 12:15

Attachments:

GoogleCodeExporter commented 9 years ago
Take2

I moved srand() to main.cc

Original comment by OWallg...@gmail.com on 8 Sep 2012 at 1:34

Attachments:

GoogleCodeExporter commented 9 years ago
Fix incorporated into the git repo and will be included in next release

Original comment by nickdowell on 9 Oct 2012 at 10:58