Don't let repeatSpeed go over 1.0

This commit is contained in:
nucular 2014-05-26 14:32:14 +02:00
parent e674b0761c
commit d0a644ecbc

View File

@ -459,7 +459,9 @@ end
function sfxr.Sound:randomize(seed)
if seed then setseed(seed) end
self:resetParameters()
self.repeatSpeed = random(1, 2)
if maybe() then
self.repeatSpeed = random(0, 1)
end
if maybe() then
self.frequency.start = random(-1, 1)^3 + 0.5