lua.wetgenes.gamecake.fun.bitsynth_task.render
local f=bitsynth_task.render(tasks,ot)
-- busy check for result , dont do this :)
repeat
local dat,err=f()
if dat then -- we loaded it
-- use sound here
else
if err then error(err) end -- caught an error
end
until dat
returns a function that will peek for a return msg and return data (s16 sound data string) on success.
on error it will return nil,error so need to check the second return if you want to handle errors.
after a successful result then subsequent calls will return nil,"done" indicating that the task has already completed.