From d0a644ecbc7a6723376793adcff02f6a5dec24a4 Mon Sep 17 00:00:00 2001 From: nucular Date: Mon, 26 May 2014 14:32:14 +0200 Subject: [PATCH] Don't let repeatSpeed go over 1.0 --- sfxr.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sfxr.lua b/sfxr.lua index cad34aa..516ff25 100644 --- a/sfxr.lua +++ b/sfxr.lua @@ -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