Don't reset volume at Sound.resetParameters(); Reset the parameters before Sound.randomize()

This commit is contained in:
nucular 2014-05-26 13:53:50 +02:00
parent 6a932ec970
commit e674b0761c

View File

@ -98,6 +98,9 @@ function sfxr.Sound:__init()
self.phaserBuffer = {}
self.noiseBuffer = {}
self.volume.master = 0.5
self.volume.sound = 0.5
self:resetParameters()
self:resetBuffers()
end
@ -108,9 +111,6 @@ function sfxr.Sound:resetParameters()
self.waveType = sfxr.SQUARE
self.superSamples = 8
self.volume.master = 0.5
self.volume.sound = 0.5
self.envelope.attack = 0.0
self.envelope.sustain = 0.3
self.envelope.punch = 0.0
@ -458,6 +458,7 @@ end
function sfxr.Sound:randomize(seed)
if seed then setseed(seed) end
self:resetParameters()
self.repeatSpeed = random(1, 2)
if maybe() then