mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-05 11:34:21 +00:00
Don't reset volume at Sound.resetParameters(); Reset the parameters before Sound.randomize()
This commit is contained in:
parent
6a932ec970
commit
e674b0761c
7
sfxr.lua
7
sfxr.lua
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user