aboutsummaryrefslogtreecommitdiffhomepage
path: root/applause.lua
diff options
context:
space:
mode:
Diffstat (limited to 'applause.lua')
-rw-r--r--applause.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/applause.lua b/applause.lua
index 702913d..dcb283e 100644
--- a/applause.lua
+++ b/applause.lua
@@ -680,7 +680,7 @@ function Stream:play(first_port)
local old_stepmul = collectgarbage("setstepmul", 100)
local channels = self.channels
- local _, err = pcall(Stream.foreach, self, function(frame)
+ local _, err = xpcall(self.foreach, debug.traceback, self, function(frame)
-- Loop should get unrolled automatically
for i = 1, channels do
local sample = tonumber(frame[i])
@@ -704,7 +704,7 @@ function Stream:play(first_port)
collectgarbage("setpause", old_pause)
collectgarbage("setstepmul", old_stepmul)
- if err then error(err, 2) end
+ if err then error(err, 0) end
end
--- Execute function for each frame generated by the stream.
@@ -776,11 +776,11 @@ function Stream:jdump(opt, outfile)
-- force some bulk calculations, so instead we always generate
-- up to 1s of samples here.
-- See also the "hotloop" optimization parameter.
- local _, err = pcall(function()
+ local _, err = xpcall(function()
for _ = 1, samplerate do tick() end
- end)
+ end, debug.traceback)
dump.off()
- if err then error(err) end
+ if err then error(err, 0) end
end
--- Convert all values to Lua numbers