Update parameters after loading a sound, fixes #11

This commit is contained in:
nucular 2014-08-26 15:55:58 +02:00
parent 6379b1e7f9
commit 03fb31ff8e

View File

@ -114,7 +114,7 @@ function playSound()
if source then if source then
source:stop() source:stop()
end end
local t = love.timer.getTime() local t = love.timer.getTime()
local tab = sound:generateTable(sfxr.FREQ_44100, sfxr.BITS_FLOAT) local tab = sound:generateTable(sfxr.FREQ_44100, sfxr.BITS_FLOAT)
t = love.timer.getTime() - t t = love.timer.getTime() - t
@ -390,6 +390,7 @@ function createActionButtons()
lb.OnClick = function(o) lb.OnClick = function(o)
local p = love.filesystem.getSaveDirectory() .. "/" .. "sound.lua" local p = love.filesystem.getSaveDirectory() .. "/" .. "sound.lua"
sound:load(p) sound:load(p)
updateParameters()
frt:SetText("Loaded from\n" .. p) frt:SetText("Loaded from\n" .. p)
fr:SetVisible(true):SetModal(true):Center() fr:SetVisible(true):SetModal(true):Center()
end end