Update script to use new process_map() API

This commit is contained in:
Robin Gareus 2020-02-26 17:48:25 +01:00
parent 65425b9fe2
commit 28accee44e
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 16 additions and 7 deletions

View file

@ -54,13 +54,16 @@ function dsp_init (rate)
end
end
function dsp_configure (ins, outs)
n_out = outs
end
function dsp_runmap (bufs, in_map, out_map, n_samples, offset)
local pos = self:shmem():atomic_get_int(0)
local buffer = self:shmem():to_int(1):array()
-- passthrough all data
ARDOUR.DSP.process_map (bufs, in_map, out_map, n_samples, offset, ARDOUR.DataType ("audio"))
ARDOUR.DSP.process_map (bufs, in_map, out_map, n_samples, offset, ARDOUR.DataType ("midi"))
ARDOUR.DSP.process_map (bufs, n_out, in_map, out_map, n_samples, offset)
-- then fill the event buffer
local ib = in_map:get (ARDOUR.DataType ("midi"), 0) -- index of 1st midi input