From 2262c0097322fc1eb5e2e6f9d7201f21a7a7005f Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 26 Oct 2009 00:12:06 +0100 Subject: [PATCH] FxMixer: use new CPU::bufMixCoeff() When mixing FX channel to another use new CPU::bufMixCoeff() function instead of implementing an own (slower) mixing loop. --- src/core/FxMixer.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index 13c7d626a..ce43d7196 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -85,13 +85,8 @@ void FxChannel::doProcessing( sampleFrame * _buf ) // mix it with this one float amt = fxm->channelSendModel(senderIndex, m_channelIndex)->value(); - sampleFrame * ch_buf = sender->m_buffer; - const float v = sender->m_volumeModel.value(); - for( f_cnt_t f = 0; f < fpp; ++f ) - { - _buf[f][0] += ch_buf[f][0] * v * amt; - _buf[f][1] += ch_buf[f][1] * v * amt; - } + CPU::bufMixCoeff( _buf, sender->m_buffer, + sender->m_volumeModel.value() * amt, fpp ); } const float v = m_volumeModel.value();