From c43a37353744fcd9008474e4007e26de697df006 Mon Sep 17 00:00:00 2001 From: Iliyas Jorio Date: Thu, 21 Aug 2014 14:27:31 +0200 Subject: [PATCH 1/2] Wave canvas: Y axis points up (as in Audacity) --- main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.lua b/main.lua index 9d679d7..1e02ba3 100644 --- a/main.lua +++ b/main.lua @@ -523,7 +523,7 @@ function updateWaveCanvas(waveview) local last = 70 for i, v in ipairs(waveview) do local x = (i * step) - local y = (v + 1) * 70 + local y = (-v + 1) * 70 love.graphics.line(x - step, last, x, y) last = y From 12b7327ff209a23726cef1c7dc52775d57138e92 Mon Sep 17 00:00:00 2001 From: Iliyas Jorio Date: Thu, 21 Aug 2014 14:33:16 +0200 Subject: [PATCH 2/2] Fixed issue #8 --- sfxr.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfxr.lua b/sfxr.lua index c655ac2..c4c8d31 100644 --- a/sfxr.lua +++ b/sfxr.lua @@ -894,7 +894,7 @@ function sfxr.Sound:exportWAV(f, freq, bits) if bits == sfxr.BITS_16 then -- wrap around a bit 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) else f:write(string.char(v))