mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
commit
0865fbe3d7
2
main.lua
2
main.lua
@ -548,7 +548,7 @@ function updateWaveCanvas(waveview)
|
|||||||
local last = 70
|
local last = 70
|
||||||
for i, v in ipairs(waveview) do
|
for i, v in ipairs(waveview) do
|
||||||
local x = (i * step)
|
local x = (i * step)
|
||||||
local y = (v + 1) * 70
|
local y = (-v + 1) * 70
|
||||||
|
|
||||||
love.graphics.line(x - step, last, x, y)
|
love.graphics.line(x - step, last, x, y)
|
||||||
last = y
|
last = y
|
||||||
|
2
sfxr.lua
2
sfxr.lua
@ -947,7 +947,7 @@ function sfxr.Sound:exportWAV(f, freq, bits)
|
|||||||
if bits == sfxr.BITS_16 then
|
if bits == sfxr.BITS_16 then
|
||||||
-- wrap around a bit
|
-- wrap around a bit
|
||||||
if v >= 256^2 then v = 0 end
|
if v >= 256^2 then v = 0 end
|
||||||
if v < 0 then v = 256^2 - 1 end
|
if v < 0 then v = 256^2 + v end
|
||||||
w16(v)
|
w16(v)
|
||||||
else
|
else
|
||||||
f:write(string.char(v))
|
f:write(string.char(v))
|
||||||
|
Loading…
Reference in New Issue
Block a user