mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
Fixed issue #5
This commit is contained in:
parent
6379b1e7f9
commit
dda0c9b605
9
sfxr.lua
9
sfxr.lua
@ -450,20 +450,13 @@ function sfxr.Sound:getEnvelopeLimit(freq)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function sfxr.Sound:getLimit(freq)
|
|
||||||
return self:getEnvelopeLimit(freq)
|
|
||||||
end
|
|
||||||
|
|
||||||
function sfxr.Sound:generateTable(freq, bits)
|
function sfxr.Sound:generateTable(freq, bits)
|
||||||
local t = {}
|
local t = {}
|
||||||
t[self:getLimit(freq)] = 0
|
|
||||||
|
|
||||||
local i = 1
|
local i = 1
|
||||||
for v in self:generate(freq, bits) do
|
for v in self:generate(freq, bits) do
|
||||||
t[i] = v or 0
|
t[i] = v
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user