Update scripts to use == operator
This commit is contained in:
parent
a2094b6831
commit
d98eca6811
@ -41,7 +41,7 @@ function dsp_runmap (bufs, in_map, out_map, n_samples, offset)
|
||||
|
||||
local bi = bufs:get_audio(ib)
|
||||
local bo = bufs:get_audio(ob)
|
||||
assert (bi:sameinstance(bo))
|
||||
assert (bi == bo)
|
||||
|
||||
local a = bufs:get_audio(ib):data(offset):array() -- get a reference (pointer to array)
|
||||
for s = 1,n_samples do
|
||||
|
@ -38,7 +38,7 @@ function dsp_run (ins, outs, n_samples)
|
||||
local gain = ARDOUR.DSP.dB_to_coefficient (ctrl[1])
|
||||
assert (#ins == #outs) -- ensure that we can run in-place (channel count matches)
|
||||
for c = 1,#ins do
|
||||
assert (ins[c]:sameinstance(outs[c])) -- check in-place
|
||||
assert (ins[c] == outs[c]) -- check in-place
|
||||
ARDOUR.DSP.apply_gain_to_buffer (ins[c], n_samples, gain); -- process in-place
|
||||
end
|
||||
end
|
||||
|
@ -148,7 +148,7 @@ function dsp_run (ins, outs, n_samples)
|
||||
for c = 1,#ins do
|
||||
-- check if output and input buffers for this channel are identical
|
||||
-- http://manual.ardour.org/lua-scripting/class_reference/#C:FloatArray
|
||||
if ins[c]:sameinstance (outs[c]) then
|
||||
if ins[c] == outs[c] then
|
||||
filters[c]:run (ins[c]:offset (off), siz) -- in-place processing
|
||||
else
|
||||
-- http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:DSP
|
||||
|
@ -109,7 +109,7 @@ function dsp_run (ins, outs, n_samples)
|
||||
-- process all channels
|
||||
for c = 1, chn do
|
||||
-- when not processing in-place, copy the data from input to output first
|
||||
if not ins[c]:sameinstance (outs[c]) then
|
||||
if ins[c] ~= outs[c] then
|
||||
ARDOUR.DSP.copy_vector (outs[c], ins[c], n_samples)
|
||||
end
|
||||
|
||||
|
@ -138,7 +138,7 @@ function dsp_run (ins, outs, n_samples)
|
||||
for c = 1,#outs do
|
||||
-- check if output and input buffers for this channel are identical
|
||||
-- http://manual.ardour.org/lua-scripting/class_reference/#C:FloatArray
|
||||
if not ins[c]:sameinstance (outs[c]) then
|
||||
if ins[c] ~= outs[c] then
|
||||
-- fast (accelerated) copy
|
||||
-- http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:DSP
|
||||
ARDOUR.DSP.copy_vector (outs[c], ins[c], n_samples)
|
||||
|
@ -11,7 +11,7 @@ end
|
||||
function dsp_run (ins, outs, n_samples)
|
||||
for c = 1, #outs do -- for each output channel (count from 1 to number of output channels)
|
||||
|
||||
if not ins[c]:sameinstance (outs[c]) then -- if processing is not in-place..
|
||||
if ins[c] ~= outs[c] then -- if processing is not in-place..
|
||||
ARDOUR.DSP.copy_vector (outs[c], ins[c], n_samples) -- ..copy data from input to output.
|
||||
end
|
||||
|
||||
|
@ -66,7 +66,7 @@ function dsp_run (ins, outs, n_samples)
|
||||
for c = 1,#ins do -- process all channels
|
||||
-- check if output and input buffers for this channel are identical
|
||||
-- http://manual.ardour.org/lua-scripting/class_reference/#C:FloatArray
|
||||
if not ins[c]:sameinstance (outs[c]) then
|
||||
if ins[c] ~= outs[c] then
|
||||
-- http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:DSP
|
||||
ARDOUR.DSP.copy_vector (outs[c]:offset (off), ins[c]:offset (off), siz)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user