More s/frame/sample/ -- Lua Scripts

Sadly this breaks existing loaded scripts. C'est la vie.
This commit is contained in:
Robin Gareus 2017-09-27 05:03:10 +02:00
parent 53fb2f6235
commit eb928b05e9
15 changed files with 24 additions and 24 deletions

View file

@ -21,13 +21,13 @@ function factory (params)
local p = params["print"] or "no"
local timeout = params["time"] or 90
a = a or 0
if p ~= "no" then print (a, n_samples, Session:frame_rate (), Session:transport_rolling ()) end -- debug output (not rt safe)
if p ~= "no" then print (a, n_samples, Session:sample_rate (), Session:transport_rolling ()) end -- debug output (not rt safe)
if (not Session:transport_rolling()) then
a = 0
return
end
a = a + n_samples
if (a > timeout * Session:frame_rate()) then
if (a > timeout * Session:sample_rate()) then
Session:request_transport_speed(0.0, true)
end
end