diff --git a/scripts/_amp2.lua b/scripts/_amp2.lua index 89d11fc0fd..5a594d57e3 100644 --- a/scripts/_amp2.lua +++ b/scripts/_amp2.lua @@ -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 diff --git a/scripts/_amp3.lua b/scripts/_amp3.lua index bb1a589b27..006a22afbb 100644 --- a/scripts/_amp3.lua +++ b/scripts/_amp3.lua @@ -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 diff --git a/scripts/_biquad_filter.lua b/scripts/_biquad_filter.lua index c0dec8bd1f..5dc6e3be1b 100644 --- a/scripts/_biquad_filter.lua +++ b/scripts/_biquad_filter.lua @@ -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 diff --git a/scripts/_notch_bank.lua b/scripts/_notch_bank.lua index 619541823d..cd1f71bdc6 100644 --- a/scripts/_notch_bank.lua +++ b/scripts/_notch_bank.lua @@ -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 diff --git a/scripts/_pong.lua b/scripts/_pong.lua index acf3c010c9..8eef49f004 100644 --- a/scripts/_pong.lua +++ b/scripts/_pong.lua @@ -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) diff --git a/scripts/_smash.lua b/scripts/_smash.lua index cdb1938a26..2ebcac19aa 100644 --- a/scripts/_smash.lua +++ b/scripts/_smash.lua @@ -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 diff --git a/scripts/amp4.lua b/scripts/amp4.lua index 6254082ad9..276b4a0af6 100644 --- a/scripts/amp4.lua +++ b/scripts/amp4.lua @@ -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