mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
cap redrawing at 15 times /s
This commit is contained in:
parent
e6a6778466
commit
c2d162c33e
1 changed files with 13 additions and 5 deletions
|
|
@ -19,7 +19,14 @@ function dsp_ioconfig ()
|
||||||
return { [1] = { audio_in = -1, audio_out = -1}, }
|
return { [1] = { audio_in = -1, audio_out = -1}, }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local rate = 0
|
||||||
|
|
||||||
|
function dsp_init (rate)
|
||||||
|
sr = rate
|
||||||
|
end
|
||||||
|
|
||||||
local ao = 0
|
local ao = 0
|
||||||
|
local draw = 0
|
||||||
|
|
||||||
function dsp_run (ins, outs, n_samples)
|
function dsp_run (ins, outs, n_samples)
|
||||||
|
|
||||||
|
|
@ -57,15 +64,16 @@ function dsp_run (ins, outs, n_samples)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (draw > (sr/15)) then
|
||||||
|
self:queue_draw()
|
||||||
|
draw = 0
|
||||||
|
end
|
||||||
|
|
||||||
-- passes array a {} into buffer
|
-- passes array a {} into buffer
|
||||||
for c = 1,#outs do
|
for c = 1,#outs do
|
||||||
outs[c]:set_table(a, n_samples)
|
outs[c]:set_table(a, n_samples)
|
||||||
end
|
end
|
||||||
|
draw = draw + n_samples
|
||||||
if (a ~= ao) then
|
|
||||||
self:queue_draw()
|
|
||||||
end
|
|
||||||
ao = amplitude
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function render_inline (ctx, w, max_h) --inline display
|
function render_inline (ctx, w, max_h) --inline display
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue