X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fpanner.cc;h=563d4e90d41da2ebca6584bfde602a4f85e4252f;hb=2dd0b9321c87838e9f2276c02f5942daac2b836e;hp=deb131e6fcd005c2c8a8252e3b81fbbc45b81831;hpb=facf6168681010134085145b5b480d864d780cd4;p=ardour.git diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index deb131e6fc..563d4e90d4 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -653,10 +653,7 @@ Multi2dPanner::distribute (Sample* src, Sample** obufs, gain_t gain_coeff, nfram } pan = left * gain_coeff; - - for (; n < nframes; ++n) { - dst[n] += src[n] * pan; - } + Session::mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); } else { @@ -666,20 +663,10 @@ Multi2dPanner::distribute (Sample* src, Sample** obufs, gain_t gain_coeff, nfram if ((pan *= gain_coeff) != 1.0f) { if (pan != 0.0f) { - - for (nframes_t n = 0; n < nframes; ++n) { - dst[n] += src[n] * pan; - } - + Session::mix_buffers_with_gain(dst,src,nframes,pan); } - - } else { - - for (nframes_t n = 0; n < nframes; ++n) { - dst[n] += src[n]; - } - + Session::mix_buffers_no_gain(dst,src,nframes); } #endif #ifdef CAN_INTERP