diff --git a/build/depends.py b/build/depends.py index 517da02111b..671c72ad186 100644 --- a/build/depends.py +++ b/build/depends.py @@ -489,6 +489,7 @@ def sources(self, build): "engine/enginemicrophone.cpp", "engine/enginedeck.cpp", "engine/enginepassthrough.cpp", + "engine/channelmixer_autogen.cpp", "engine/enginecontrol.cpp", "engine/ratecontrol.cpp", @@ -735,7 +736,7 @@ def sources(self, build): "util/timer.cpp", "util/performancetimer.cpp", "util/version.cpp", - "util/rlimit.cpp", + "util/rlimit.cpp", # Add the QRC file which compiles in some extra resources # (prefs icons, etc.) diff --git a/scripts/generate_sample_functions.py b/scripts/generate_sample_functions.py new file mode 100755 index 00000000000..20e23cf7360 --- /dev/null +++ b/scripts/generate_sample_functions.py @@ -0,0 +1,222 @@ +#!/usr/bin/env python +import argparse +import sys + +BASIC_INDENT = 4 + +COPY_WITH_GAIN_METHOD_PATTERN = 'copy%(i)dWithGain' +def copy_with_gain_method_name(i): + return COPY_WITH_GAIN_METHOD_PATTERN % {'i' : i} + +RAMPING_GAIN_METHOD_PATTERN = 'copy%(i)dWithRampingGain' +def copy_with_ramping_gain_method_name(i): + return RAMPING_GAIN_METHOD_PATTERN % {'i': i} + +def method_call(method_name, args): + return '%(method_name)s(%(args)s)' % {'method_name': method_name, + 'args': ', '.join(args)} + +def hanging_indent(base, groups, hanging_suffix, terminator, depth=0): + return map(lambda line: ' ' * BASIC_INDENT * depth + line, map(''.join, zip( + [base] + [' ' * len(base)] * (len(groups) - 1), + groups, + [hanging_suffix] * (len(groups) - 1) + [terminator]))) + +def write_channelmixer_autogen(output, num_channels): + output.append('#include "engine/channelmixer.h"') + output.append('#include "util/timer.h"') + output.append('#include "sampleutil.h"') + output.append('////////////////////////////////////////////////////////') + output.append('// THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY! //') + output.append('// SEE scripts/generate_sample_functions.py //') + output.append('////////////////////////////////////////////////////////') + output.append('') + output.append('// static') + + header = 'void ChannelMixer::mixChannels(' + args = ['const QList& channels', + 'const EngineMaster::GainCalculator& gainCalculator', + 'unsigned int channelBitvector', + 'unsigned int maxChannels', + 'QList* channelGainCache', + 'CSAMPLE* pOutput', + 'unsigned int iBufferSize'] + output.extend(hanging_indent(header, args, ',', ') {')) + + def write(data, depth=0): + output.append(' ' * (BASIC_INDENT * depth) + data) + + write('int activeChannels[%d] = {' % num_channels, depth=1) + for i in xrange(num_channels): + if i == num_channels - 1: + write('-1};', depth=2) + else: + write('-1,', depth=2) + + write('unsigned int totalActive = 0;', depth=1) + write('for (unsigned int i = 0; i < maxChannels; ++i) {', depth=1) + write('if ((channelBitvector & (1 << i)) == 0) {', depth=2) + write('continue;', depth=3) + write('}', depth=2) + write('if (totalActive < %d) {' % num_channels, depth=2) + write('activeChannels[totalActive] = i;', depth=3) + write('}', depth=2) + write('++totalActive;', depth=2) + write('}', depth=1) + + write('if (totalActive == 0) {', depth=1) + write('ScopedTimer t("EngineMaster::mixChannels_0active");', depth=2) + write('SampleUtil::applyGain(pOutput, 0.0f, iBufferSize);', depth=2) + for i in xrange(1, num_channels+1): + write('} else if (totalActive == %d) {' % i, depth=1) + write('ScopedTimer t("EngineMaster::mixChannels_%(i)dactive");' % {'i': i}, depth=2) + for j in xrange(i): + write('const int pChannelIndex%(j)d = activeChannels[%(j)d];' % {'j': j}, depth=2) + write('EngineMaster::ChannelInfo* pChannel%(j)d = channels[pChannelIndex%(j)d];' % {'j': j}, depth=2) + write('CSAMPLE oldGain%(j)d = (*channelGainCache)[pChannelIndex%(j)d];' % {'j': j}, depth=2) + write('CSAMPLE newGain%(j)d = gainCalculator.getGain(pChannel%(j)d);' % {'j': j}, depth=2) + write('(*channelGainCache)[pChannelIndex%(j)d] = newGain%(j)d;' % {'j': j}, depth=2) + write('CSAMPLE* pBuffer%(j)d = pChannel%(j)d->m_pBuffer;' % {'j': j}, depth=2) + + arg_groups = ['pOutput'] + ['pBuffer%(j)d, oldGain%(j)d, newGain%(j)d' % {'j': j} for j in xrange(i)] + ['iBufferSize'] + call_prefix = "SampleUtil::" + copy_with_ramping_gain_method_name(i) + '(' + output.extend(hanging_indent(call_prefix, arg_groups, ',', ');', depth=2)) + + + write('} else {', depth=1) + write('// Set pOutput to all 0s', depth=2) + write('SampleUtil::applyGain(pOutput, 0.0f, iBufferSize);', depth=2) + write('for (unsigned int i = 0; i < maxChannels; ++i) {', depth=2) + write('if (channelBitvector & (1 << i)) {', depth=3) + write('EngineMaster::ChannelInfo* pChannelInfo = channels[i];', depth=4) + write('CSAMPLE* pBuffer = pChannelInfo->m_pBuffer;', depth=4) + write('CSAMPLE gain = gainCalculator.getGain(pChannelInfo);', depth=4) + write('SampleUtil::addWithGain(pOutput, pBuffer, gain, iBufferSize);', depth=4) + write('}', depth=3) + write('}', depth=2) + write('}', depth=1) + output.append('}') + +def write_sampleutil_autogen(output, num_channels): + output.append('#ifndef SAMPLEUTILAUTOGEN_H') + output.append('#define SAMPLEUTILAUTOGEN_H') + output.append('////////////////////////////////////////////////////////') + output.append('// THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY! //') + output.append('// SEE scripts/generate_sample_functions.py //') + output.append('////////////////////////////////////////////////////////') + + for i in xrange(1, num_channels + 1): + copy_with_gain(output, 0, i) + copy_with_ramping_gain(output, 0, i) + + output.append('#endif /* SAMPLEUTILAUTOGEN_H */') + +def copy_with_gain(output, base_indent_depth, num_channels): + def write(data, depth=0): + output.append(' ' * (BASIC_INDENT * (depth + base_indent_depth)) + data) + + header = "static inline void %s(" % copy_with_gain_method_name(num_channels) + arg_groups = ['CSAMPLE* pDest'] + [ + "const CSAMPLE* pSrc%(i)d, CSAMPLE gain%(i)d" % {'i': i} + for i in xrange(num_channels)] + ['int iNumSamples'] + + output.extend(hanging_indent(header, arg_groups, ',', ') {', + depth=base_indent_depth)) + + if (num_channels == 1): + write('copyWithGain(pDest, pSrc0, gain0, iNumSamples);', depth=1) + write('return;', depth=1) + write('}') + return + + for i in xrange(num_channels): + write('if (gain%(i)d == 0.0) {' % {'i': i}, depth=1) + args = ['pDest',] + ['pSrc%(i)d, gain%(i)d' % {'i': j} for j in xrange(num_channels) if i != j] + ['iNumSamples',] + write('%s;' %method_call(copy_with_gain_method_name(num_channels - 1), args), depth=2) + write('return;', depth=2) + write('}', depth=1) + + write('for (int i = 0; i < iNumSamples; ++i) {', depth=1) + terms = ['pSrc%(i)d[i] * gain%(i)d' % {'i': i} for i in xrange(num_channels)] + assign = 'pDest[i] = ' + output.extend(hanging_indent(assign, terms, ' +', ';', depth=2)) + + write('}', depth=1) + write('}') + + +def copy_with_ramping_gain(output, base_indent_depth, num_channels): + def write(data, depth=0): + output.append(' ' * (BASIC_INDENT * (depth + base_indent_depth)) + data) + + header = "static inline void %s(" % copy_with_ramping_gain_method_name(num_channels) + arg_groups = ['CSAMPLE* pDest'] + [ + "const CSAMPLE* pSrc%(i)d, CSAMPLE gain%(i)din, CSAMPLE gain%(i)dout" % {'i': i} + for i in xrange(num_channels)] + ['int iNumSamples'] + + output.extend(hanging_indent(header, arg_groups, ',', ') {', + depth=base_indent_depth)) + + if (num_channels == 1): + write('copyWithRampingGain(pDest, pSrc0, gain0in, gain0out, iNumSamples);', depth=1) + write('return;', depth=1) + write('}') + return + + + for i in xrange(num_channels): + write('if (gain%(i)din == 0.0 && gain%(i)dout == 0.0) {' % {'i': i}, depth=1) + args = ['pDest',] + ['pSrc%(i)d, gain%(i)din, gain%(i)dout' % {'i': j} for j in xrange(num_channels) if i != j] + ['iNumSamples',] + write('%s;' % method_call(copy_with_ramping_gain_method_name(num_channels - 1), args), + depth=2) + write('return;', depth=2) + write('}', depth=1) + + for i in xrange(num_channels): + write('const CSAMPLE delta%(i)d = 2.0 * (gain%(i)dout - gain%(i)din) / iNumSamples;' % {'i': i}, depth=1) + write('CSAMPLE gain%(i)d = gain%(i)din;' % {'i': i}, depth=1) + + increments = ['i += 2',] + ['gain%(i)d += delta%(i)d' % {'i': i} for i in xrange(num_channels)] + + write('for (int i = 0; i < iNumSamples; %s) {' % ', '.join(increments), depth=1) + + terms1 = [] + terms2 = [] + for i in xrange(num_channels): + terms1.append('pSrc%(i)d[i] * gain%(i)d' % {'i': i}) + terms2.append('pSrc%(i)d[i + 1] * gain%(i)d' % {'i': i}) + + assign1 = 'pDest[i] = ' + assign2 = 'pDest[i + 1] = ' + + output.extend(hanging_indent(assign1, terms1, ' +', ';', depth=2)) + output.extend(hanging_indent(assign2, terms2, ' +', ';', depth=2)) + + write('}', depth=1) + write('}') + +def main(args): + sampleutil_output_lines = [] + write_sampleutil_autogen(sampleutil_output_lines, args.max_channels) + + output = (open(args.sampleutil_autogen_h, 'w') + if args.sampleutil_autogen_h else sys.stdout) + output.write('\n'.join(sampleutil_output_lines) + '\n') + + channelmixer_output_lines = [] + write_channelmixer_autogen(channelmixer_output_lines, args.max_channels) + + output = (open(args.channelmixer_autogen_cpp, 'w') + if args.channelmixer_autogen_cpp else sys.stdout) + output.write('\n'.join(channelmixer_output_lines) + '\n') + + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description='Auto-generate sample processing and mixing functions.') + parser.add_argument('--sampleutil_autogen_h') + parser.add_argument('--channelmixer_autogen_cpp') + parser.add_argument('--max_channels', type=int, default=32) + args = parser.parse_args() + main(args) diff --git a/src/engine/channelmixer.h b/src/engine/channelmixer.h new file mode 100644 index 00000000000..b1fd34005dc --- /dev/null +++ b/src/engine/channelmixer.h @@ -0,0 +1,18 @@ +#ifndef CHANNELMIXER_H +#define CHANNELMIXER_H + +#include "defs.h" +#include "engine/enginemaster.h" + +class ChannelMixer { + public: + static void mixChannels(const QList& channels, + const EngineMaster::GainCalculator& gainCalculator, + unsigned int channelBitvector, + unsigned int maxChannels, + QList* channelGainCache, + CSAMPLE* pOutput, + unsigned int iBufferSize); +}; + +#endif /* CHANNELMIXER_H */ diff --git a/src/engine/channelmixer_autogen.cpp b/src/engine/channelmixer_autogen.cpp new file mode 100644 index 00000000000..fd403a9b237 --- /dev/null +++ b/src/engine/channelmixer_autogen.cpp @@ -0,0 +1,3899 @@ +#include "engine/channelmixer.h" +#include "util/timer.h" +#include "sampleutil.h" +//////////////////////////////////////////////////////// +// THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY! // +// SEE scripts/generate_sample_functions.py // +//////////////////////////////////////////////////////// + +// static +void ChannelMixer::mixChannels(const QList& channels, + const EngineMaster::GainCalculator& gainCalculator, + unsigned int channelBitvector, + unsigned int maxChannels, + QList* channelGainCache, + CSAMPLE* pOutput, + unsigned int iBufferSize) { + int activeChannels[32] = { + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1}; + unsigned int totalActive = 0; + for (unsigned int i = 0; i < maxChannels; ++i) { + if ((channelBitvector & (1 << i)) == 0) { + continue; + } + if (totalActive < 32) { + activeChannels[totalActive] = i; + } + ++totalActive; + } + if (totalActive == 0) { + ScopedTimer t("EngineMaster::mixChannels_0active"); + SampleUtil::applyGain(pOutput, 0.0f, iBufferSize); + } else if (totalActive == 1) { + ScopedTimer t("EngineMaster::mixChannels_1active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + SampleUtil::copy1WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + iBufferSize); + } else if (totalActive == 2) { + ScopedTimer t("EngineMaster::mixChannels_2active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + SampleUtil::copy2WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + iBufferSize); + } else if (totalActive == 3) { + ScopedTimer t("EngineMaster::mixChannels_3active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + SampleUtil::copy3WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + iBufferSize); + } else if (totalActive == 4) { + ScopedTimer t("EngineMaster::mixChannels_4active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + SampleUtil::copy4WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + iBufferSize); + } else if (totalActive == 5) { + ScopedTimer t("EngineMaster::mixChannels_5active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + SampleUtil::copy5WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + iBufferSize); + } else if (totalActive == 6) { + ScopedTimer t("EngineMaster::mixChannels_6active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + SampleUtil::copy6WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + iBufferSize); + } else if (totalActive == 7) { + ScopedTimer t("EngineMaster::mixChannels_7active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + SampleUtil::copy7WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + iBufferSize); + } else if (totalActive == 8) { + ScopedTimer t("EngineMaster::mixChannels_8active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + SampleUtil::copy8WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + iBufferSize); + } else if (totalActive == 9) { + ScopedTimer t("EngineMaster::mixChannels_9active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + SampleUtil::copy9WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + iBufferSize); + } else if (totalActive == 10) { + ScopedTimer t("EngineMaster::mixChannels_10active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + SampleUtil::copy10WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + iBufferSize); + } else if (totalActive == 11) { + ScopedTimer t("EngineMaster::mixChannels_11active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + SampleUtil::copy11WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + iBufferSize); + } else if (totalActive == 12) { + ScopedTimer t("EngineMaster::mixChannels_12active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + SampleUtil::copy12WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + iBufferSize); + } else if (totalActive == 13) { + ScopedTimer t("EngineMaster::mixChannels_13active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + SampleUtil::copy13WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + iBufferSize); + } else if (totalActive == 14) { + ScopedTimer t("EngineMaster::mixChannels_14active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + SampleUtil::copy14WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + iBufferSize); + } else if (totalActive == 15) { + ScopedTimer t("EngineMaster::mixChannels_15active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + SampleUtil::copy15WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + iBufferSize); + } else if (totalActive == 16) { + ScopedTimer t("EngineMaster::mixChannels_16active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + SampleUtil::copy16WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + iBufferSize); + } else if (totalActive == 17) { + ScopedTimer t("EngineMaster::mixChannels_17active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + SampleUtil::copy17WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + iBufferSize); + } else if (totalActive == 18) { + ScopedTimer t("EngineMaster::mixChannels_18active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + SampleUtil::copy18WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + iBufferSize); + } else if (totalActive == 19) { + ScopedTimer t("EngineMaster::mixChannels_19active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + SampleUtil::copy19WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + iBufferSize); + } else if (totalActive == 20) { + ScopedTimer t("EngineMaster::mixChannels_20active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + SampleUtil::copy20WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + iBufferSize); + } else if (totalActive == 21) { + ScopedTimer t("EngineMaster::mixChannels_21active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + SampleUtil::copy21WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + iBufferSize); + } else if (totalActive == 22) { + ScopedTimer t("EngineMaster::mixChannels_22active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + SampleUtil::copy22WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + iBufferSize); + } else if (totalActive == 23) { + ScopedTimer t("EngineMaster::mixChannels_23active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + SampleUtil::copy23WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + iBufferSize); + } else if (totalActive == 24) { + ScopedTimer t("EngineMaster::mixChannels_24active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + SampleUtil::copy24WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + iBufferSize); + } else if (totalActive == 25) { + ScopedTimer t("EngineMaster::mixChannels_25active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + const int pChannelIndex24 = activeChannels[24]; + EngineMaster::ChannelInfo* pChannel24 = channels[pChannelIndex24]; + CSAMPLE oldGain24 = (*channelGainCache)[pChannelIndex24]; + CSAMPLE newGain24 = gainCalculator.getGain(pChannel24); + (*channelGainCache)[pChannelIndex24] = newGain24; + CSAMPLE* pBuffer24 = pChannel24->m_pBuffer; + SampleUtil::copy25WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + pBuffer24, oldGain24, newGain24, + iBufferSize); + } else if (totalActive == 26) { + ScopedTimer t("EngineMaster::mixChannels_26active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + const int pChannelIndex24 = activeChannels[24]; + EngineMaster::ChannelInfo* pChannel24 = channels[pChannelIndex24]; + CSAMPLE oldGain24 = (*channelGainCache)[pChannelIndex24]; + CSAMPLE newGain24 = gainCalculator.getGain(pChannel24); + (*channelGainCache)[pChannelIndex24] = newGain24; + CSAMPLE* pBuffer24 = pChannel24->m_pBuffer; + const int pChannelIndex25 = activeChannels[25]; + EngineMaster::ChannelInfo* pChannel25 = channels[pChannelIndex25]; + CSAMPLE oldGain25 = (*channelGainCache)[pChannelIndex25]; + CSAMPLE newGain25 = gainCalculator.getGain(pChannel25); + (*channelGainCache)[pChannelIndex25] = newGain25; + CSAMPLE* pBuffer25 = pChannel25->m_pBuffer; + SampleUtil::copy26WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + pBuffer24, oldGain24, newGain24, + pBuffer25, oldGain25, newGain25, + iBufferSize); + } else if (totalActive == 27) { + ScopedTimer t("EngineMaster::mixChannels_27active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + const int pChannelIndex24 = activeChannels[24]; + EngineMaster::ChannelInfo* pChannel24 = channels[pChannelIndex24]; + CSAMPLE oldGain24 = (*channelGainCache)[pChannelIndex24]; + CSAMPLE newGain24 = gainCalculator.getGain(pChannel24); + (*channelGainCache)[pChannelIndex24] = newGain24; + CSAMPLE* pBuffer24 = pChannel24->m_pBuffer; + const int pChannelIndex25 = activeChannels[25]; + EngineMaster::ChannelInfo* pChannel25 = channels[pChannelIndex25]; + CSAMPLE oldGain25 = (*channelGainCache)[pChannelIndex25]; + CSAMPLE newGain25 = gainCalculator.getGain(pChannel25); + (*channelGainCache)[pChannelIndex25] = newGain25; + CSAMPLE* pBuffer25 = pChannel25->m_pBuffer; + const int pChannelIndex26 = activeChannels[26]; + EngineMaster::ChannelInfo* pChannel26 = channels[pChannelIndex26]; + CSAMPLE oldGain26 = (*channelGainCache)[pChannelIndex26]; + CSAMPLE newGain26 = gainCalculator.getGain(pChannel26); + (*channelGainCache)[pChannelIndex26] = newGain26; + CSAMPLE* pBuffer26 = pChannel26->m_pBuffer; + SampleUtil::copy27WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + pBuffer24, oldGain24, newGain24, + pBuffer25, oldGain25, newGain25, + pBuffer26, oldGain26, newGain26, + iBufferSize); + } else if (totalActive == 28) { + ScopedTimer t("EngineMaster::mixChannels_28active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + const int pChannelIndex24 = activeChannels[24]; + EngineMaster::ChannelInfo* pChannel24 = channels[pChannelIndex24]; + CSAMPLE oldGain24 = (*channelGainCache)[pChannelIndex24]; + CSAMPLE newGain24 = gainCalculator.getGain(pChannel24); + (*channelGainCache)[pChannelIndex24] = newGain24; + CSAMPLE* pBuffer24 = pChannel24->m_pBuffer; + const int pChannelIndex25 = activeChannels[25]; + EngineMaster::ChannelInfo* pChannel25 = channels[pChannelIndex25]; + CSAMPLE oldGain25 = (*channelGainCache)[pChannelIndex25]; + CSAMPLE newGain25 = gainCalculator.getGain(pChannel25); + (*channelGainCache)[pChannelIndex25] = newGain25; + CSAMPLE* pBuffer25 = pChannel25->m_pBuffer; + const int pChannelIndex26 = activeChannels[26]; + EngineMaster::ChannelInfo* pChannel26 = channels[pChannelIndex26]; + CSAMPLE oldGain26 = (*channelGainCache)[pChannelIndex26]; + CSAMPLE newGain26 = gainCalculator.getGain(pChannel26); + (*channelGainCache)[pChannelIndex26] = newGain26; + CSAMPLE* pBuffer26 = pChannel26->m_pBuffer; + const int pChannelIndex27 = activeChannels[27]; + EngineMaster::ChannelInfo* pChannel27 = channels[pChannelIndex27]; + CSAMPLE oldGain27 = (*channelGainCache)[pChannelIndex27]; + CSAMPLE newGain27 = gainCalculator.getGain(pChannel27); + (*channelGainCache)[pChannelIndex27] = newGain27; + CSAMPLE* pBuffer27 = pChannel27->m_pBuffer; + SampleUtil::copy28WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + pBuffer24, oldGain24, newGain24, + pBuffer25, oldGain25, newGain25, + pBuffer26, oldGain26, newGain26, + pBuffer27, oldGain27, newGain27, + iBufferSize); + } else if (totalActive == 29) { + ScopedTimer t("EngineMaster::mixChannels_29active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + const int pChannelIndex24 = activeChannels[24]; + EngineMaster::ChannelInfo* pChannel24 = channels[pChannelIndex24]; + CSAMPLE oldGain24 = (*channelGainCache)[pChannelIndex24]; + CSAMPLE newGain24 = gainCalculator.getGain(pChannel24); + (*channelGainCache)[pChannelIndex24] = newGain24; + CSAMPLE* pBuffer24 = pChannel24->m_pBuffer; + const int pChannelIndex25 = activeChannels[25]; + EngineMaster::ChannelInfo* pChannel25 = channels[pChannelIndex25]; + CSAMPLE oldGain25 = (*channelGainCache)[pChannelIndex25]; + CSAMPLE newGain25 = gainCalculator.getGain(pChannel25); + (*channelGainCache)[pChannelIndex25] = newGain25; + CSAMPLE* pBuffer25 = pChannel25->m_pBuffer; + const int pChannelIndex26 = activeChannels[26]; + EngineMaster::ChannelInfo* pChannel26 = channels[pChannelIndex26]; + CSAMPLE oldGain26 = (*channelGainCache)[pChannelIndex26]; + CSAMPLE newGain26 = gainCalculator.getGain(pChannel26); + (*channelGainCache)[pChannelIndex26] = newGain26; + CSAMPLE* pBuffer26 = pChannel26->m_pBuffer; + const int pChannelIndex27 = activeChannels[27]; + EngineMaster::ChannelInfo* pChannel27 = channels[pChannelIndex27]; + CSAMPLE oldGain27 = (*channelGainCache)[pChannelIndex27]; + CSAMPLE newGain27 = gainCalculator.getGain(pChannel27); + (*channelGainCache)[pChannelIndex27] = newGain27; + CSAMPLE* pBuffer27 = pChannel27->m_pBuffer; + const int pChannelIndex28 = activeChannels[28]; + EngineMaster::ChannelInfo* pChannel28 = channels[pChannelIndex28]; + CSAMPLE oldGain28 = (*channelGainCache)[pChannelIndex28]; + CSAMPLE newGain28 = gainCalculator.getGain(pChannel28); + (*channelGainCache)[pChannelIndex28] = newGain28; + CSAMPLE* pBuffer28 = pChannel28->m_pBuffer; + SampleUtil::copy29WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + pBuffer24, oldGain24, newGain24, + pBuffer25, oldGain25, newGain25, + pBuffer26, oldGain26, newGain26, + pBuffer27, oldGain27, newGain27, + pBuffer28, oldGain28, newGain28, + iBufferSize); + } else if (totalActive == 30) { + ScopedTimer t("EngineMaster::mixChannels_30active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + const int pChannelIndex24 = activeChannels[24]; + EngineMaster::ChannelInfo* pChannel24 = channels[pChannelIndex24]; + CSAMPLE oldGain24 = (*channelGainCache)[pChannelIndex24]; + CSAMPLE newGain24 = gainCalculator.getGain(pChannel24); + (*channelGainCache)[pChannelIndex24] = newGain24; + CSAMPLE* pBuffer24 = pChannel24->m_pBuffer; + const int pChannelIndex25 = activeChannels[25]; + EngineMaster::ChannelInfo* pChannel25 = channels[pChannelIndex25]; + CSAMPLE oldGain25 = (*channelGainCache)[pChannelIndex25]; + CSAMPLE newGain25 = gainCalculator.getGain(pChannel25); + (*channelGainCache)[pChannelIndex25] = newGain25; + CSAMPLE* pBuffer25 = pChannel25->m_pBuffer; + const int pChannelIndex26 = activeChannels[26]; + EngineMaster::ChannelInfo* pChannel26 = channels[pChannelIndex26]; + CSAMPLE oldGain26 = (*channelGainCache)[pChannelIndex26]; + CSAMPLE newGain26 = gainCalculator.getGain(pChannel26); + (*channelGainCache)[pChannelIndex26] = newGain26; + CSAMPLE* pBuffer26 = pChannel26->m_pBuffer; + const int pChannelIndex27 = activeChannels[27]; + EngineMaster::ChannelInfo* pChannel27 = channels[pChannelIndex27]; + CSAMPLE oldGain27 = (*channelGainCache)[pChannelIndex27]; + CSAMPLE newGain27 = gainCalculator.getGain(pChannel27); + (*channelGainCache)[pChannelIndex27] = newGain27; + CSAMPLE* pBuffer27 = pChannel27->m_pBuffer; + const int pChannelIndex28 = activeChannels[28]; + EngineMaster::ChannelInfo* pChannel28 = channels[pChannelIndex28]; + CSAMPLE oldGain28 = (*channelGainCache)[pChannelIndex28]; + CSAMPLE newGain28 = gainCalculator.getGain(pChannel28); + (*channelGainCache)[pChannelIndex28] = newGain28; + CSAMPLE* pBuffer28 = pChannel28->m_pBuffer; + const int pChannelIndex29 = activeChannels[29]; + EngineMaster::ChannelInfo* pChannel29 = channels[pChannelIndex29]; + CSAMPLE oldGain29 = (*channelGainCache)[pChannelIndex29]; + CSAMPLE newGain29 = gainCalculator.getGain(pChannel29); + (*channelGainCache)[pChannelIndex29] = newGain29; + CSAMPLE* pBuffer29 = pChannel29->m_pBuffer; + SampleUtil::copy30WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + pBuffer24, oldGain24, newGain24, + pBuffer25, oldGain25, newGain25, + pBuffer26, oldGain26, newGain26, + pBuffer27, oldGain27, newGain27, + pBuffer28, oldGain28, newGain28, + pBuffer29, oldGain29, newGain29, + iBufferSize); + } else if (totalActive == 31) { + ScopedTimer t("EngineMaster::mixChannels_31active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + const int pChannelIndex24 = activeChannels[24]; + EngineMaster::ChannelInfo* pChannel24 = channels[pChannelIndex24]; + CSAMPLE oldGain24 = (*channelGainCache)[pChannelIndex24]; + CSAMPLE newGain24 = gainCalculator.getGain(pChannel24); + (*channelGainCache)[pChannelIndex24] = newGain24; + CSAMPLE* pBuffer24 = pChannel24->m_pBuffer; + const int pChannelIndex25 = activeChannels[25]; + EngineMaster::ChannelInfo* pChannel25 = channels[pChannelIndex25]; + CSAMPLE oldGain25 = (*channelGainCache)[pChannelIndex25]; + CSAMPLE newGain25 = gainCalculator.getGain(pChannel25); + (*channelGainCache)[pChannelIndex25] = newGain25; + CSAMPLE* pBuffer25 = pChannel25->m_pBuffer; + const int pChannelIndex26 = activeChannels[26]; + EngineMaster::ChannelInfo* pChannel26 = channels[pChannelIndex26]; + CSAMPLE oldGain26 = (*channelGainCache)[pChannelIndex26]; + CSAMPLE newGain26 = gainCalculator.getGain(pChannel26); + (*channelGainCache)[pChannelIndex26] = newGain26; + CSAMPLE* pBuffer26 = pChannel26->m_pBuffer; + const int pChannelIndex27 = activeChannels[27]; + EngineMaster::ChannelInfo* pChannel27 = channels[pChannelIndex27]; + CSAMPLE oldGain27 = (*channelGainCache)[pChannelIndex27]; + CSAMPLE newGain27 = gainCalculator.getGain(pChannel27); + (*channelGainCache)[pChannelIndex27] = newGain27; + CSAMPLE* pBuffer27 = pChannel27->m_pBuffer; + const int pChannelIndex28 = activeChannels[28]; + EngineMaster::ChannelInfo* pChannel28 = channels[pChannelIndex28]; + CSAMPLE oldGain28 = (*channelGainCache)[pChannelIndex28]; + CSAMPLE newGain28 = gainCalculator.getGain(pChannel28); + (*channelGainCache)[pChannelIndex28] = newGain28; + CSAMPLE* pBuffer28 = pChannel28->m_pBuffer; + const int pChannelIndex29 = activeChannels[29]; + EngineMaster::ChannelInfo* pChannel29 = channels[pChannelIndex29]; + CSAMPLE oldGain29 = (*channelGainCache)[pChannelIndex29]; + CSAMPLE newGain29 = gainCalculator.getGain(pChannel29); + (*channelGainCache)[pChannelIndex29] = newGain29; + CSAMPLE* pBuffer29 = pChannel29->m_pBuffer; + const int pChannelIndex30 = activeChannels[30]; + EngineMaster::ChannelInfo* pChannel30 = channels[pChannelIndex30]; + CSAMPLE oldGain30 = (*channelGainCache)[pChannelIndex30]; + CSAMPLE newGain30 = gainCalculator.getGain(pChannel30); + (*channelGainCache)[pChannelIndex30] = newGain30; + CSAMPLE* pBuffer30 = pChannel30->m_pBuffer; + SampleUtil::copy31WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + pBuffer24, oldGain24, newGain24, + pBuffer25, oldGain25, newGain25, + pBuffer26, oldGain26, newGain26, + pBuffer27, oldGain27, newGain27, + pBuffer28, oldGain28, newGain28, + pBuffer29, oldGain29, newGain29, + pBuffer30, oldGain30, newGain30, + iBufferSize); + } else if (totalActive == 32) { + ScopedTimer t("EngineMaster::mixChannels_32active"); + const int pChannelIndex0 = activeChannels[0]; + EngineMaster::ChannelInfo* pChannel0 = channels[pChannelIndex0]; + CSAMPLE oldGain0 = (*channelGainCache)[pChannelIndex0]; + CSAMPLE newGain0 = gainCalculator.getGain(pChannel0); + (*channelGainCache)[pChannelIndex0] = newGain0; + CSAMPLE* pBuffer0 = pChannel0->m_pBuffer; + const int pChannelIndex1 = activeChannels[1]; + EngineMaster::ChannelInfo* pChannel1 = channels[pChannelIndex1]; + CSAMPLE oldGain1 = (*channelGainCache)[pChannelIndex1]; + CSAMPLE newGain1 = gainCalculator.getGain(pChannel1); + (*channelGainCache)[pChannelIndex1] = newGain1; + CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; + const int pChannelIndex2 = activeChannels[2]; + EngineMaster::ChannelInfo* pChannel2 = channels[pChannelIndex2]; + CSAMPLE oldGain2 = (*channelGainCache)[pChannelIndex2]; + CSAMPLE newGain2 = gainCalculator.getGain(pChannel2); + (*channelGainCache)[pChannelIndex2] = newGain2; + CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; + const int pChannelIndex3 = activeChannels[3]; + EngineMaster::ChannelInfo* pChannel3 = channels[pChannelIndex3]; + CSAMPLE oldGain3 = (*channelGainCache)[pChannelIndex3]; + CSAMPLE newGain3 = gainCalculator.getGain(pChannel3); + (*channelGainCache)[pChannelIndex3] = newGain3; + CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; + const int pChannelIndex4 = activeChannels[4]; + EngineMaster::ChannelInfo* pChannel4 = channels[pChannelIndex4]; + CSAMPLE oldGain4 = (*channelGainCache)[pChannelIndex4]; + CSAMPLE newGain4 = gainCalculator.getGain(pChannel4); + (*channelGainCache)[pChannelIndex4] = newGain4; + CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; + const int pChannelIndex5 = activeChannels[5]; + EngineMaster::ChannelInfo* pChannel5 = channels[pChannelIndex5]; + CSAMPLE oldGain5 = (*channelGainCache)[pChannelIndex5]; + CSAMPLE newGain5 = gainCalculator.getGain(pChannel5); + (*channelGainCache)[pChannelIndex5] = newGain5; + CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; + const int pChannelIndex6 = activeChannels[6]; + EngineMaster::ChannelInfo* pChannel6 = channels[pChannelIndex6]; + CSAMPLE oldGain6 = (*channelGainCache)[pChannelIndex6]; + CSAMPLE newGain6 = gainCalculator.getGain(pChannel6); + (*channelGainCache)[pChannelIndex6] = newGain6; + CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; + const int pChannelIndex7 = activeChannels[7]; + EngineMaster::ChannelInfo* pChannel7 = channels[pChannelIndex7]; + CSAMPLE oldGain7 = (*channelGainCache)[pChannelIndex7]; + CSAMPLE newGain7 = gainCalculator.getGain(pChannel7); + (*channelGainCache)[pChannelIndex7] = newGain7; + CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; + const int pChannelIndex8 = activeChannels[8]; + EngineMaster::ChannelInfo* pChannel8 = channels[pChannelIndex8]; + CSAMPLE oldGain8 = (*channelGainCache)[pChannelIndex8]; + CSAMPLE newGain8 = gainCalculator.getGain(pChannel8); + (*channelGainCache)[pChannelIndex8] = newGain8; + CSAMPLE* pBuffer8 = pChannel8->m_pBuffer; + const int pChannelIndex9 = activeChannels[9]; + EngineMaster::ChannelInfo* pChannel9 = channels[pChannelIndex9]; + CSAMPLE oldGain9 = (*channelGainCache)[pChannelIndex9]; + CSAMPLE newGain9 = gainCalculator.getGain(pChannel9); + (*channelGainCache)[pChannelIndex9] = newGain9; + CSAMPLE* pBuffer9 = pChannel9->m_pBuffer; + const int pChannelIndex10 = activeChannels[10]; + EngineMaster::ChannelInfo* pChannel10 = channels[pChannelIndex10]; + CSAMPLE oldGain10 = (*channelGainCache)[pChannelIndex10]; + CSAMPLE newGain10 = gainCalculator.getGain(pChannel10); + (*channelGainCache)[pChannelIndex10] = newGain10; + CSAMPLE* pBuffer10 = pChannel10->m_pBuffer; + const int pChannelIndex11 = activeChannels[11]; + EngineMaster::ChannelInfo* pChannel11 = channels[pChannelIndex11]; + CSAMPLE oldGain11 = (*channelGainCache)[pChannelIndex11]; + CSAMPLE newGain11 = gainCalculator.getGain(pChannel11); + (*channelGainCache)[pChannelIndex11] = newGain11; + CSAMPLE* pBuffer11 = pChannel11->m_pBuffer; + const int pChannelIndex12 = activeChannels[12]; + EngineMaster::ChannelInfo* pChannel12 = channels[pChannelIndex12]; + CSAMPLE oldGain12 = (*channelGainCache)[pChannelIndex12]; + CSAMPLE newGain12 = gainCalculator.getGain(pChannel12); + (*channelGainCache)[pChannelIndex12] = newGain12; + CSAMPLE* pBuffer12 = pChannel12->m_pBuffer; + const int pChannelIndex13 = activeChannels[13]; + EngineMaster::ChannelInfo* pChannel13 = channels[pChannelIndex13]; + CSAMPLE oldGain13 = (*channelGainCache)[pChannelIndex13]; + CSAMPLE newGain13 = gainCalculator.getGain(pChannel13); + (*channelGainCache)[pChannelIndex13] = newGain13; + CSAMPLE* pBuffer13 = pChannel13->m_pBuffer; + const int pChannelIndex14 = activeChannels[14]; + EngineMaster::ChannelInfo* pChannel14 = channels[pChannelIndex14]; + CSAMPLE oldGain14 = (*channelGainCache)[pChannelIndex14]; + CSAMPLE newGain14 = gainCalculator.getGain(pChannel14); + (*channelGainCache)[pChannelIndex14] = newGain14; + CSAMPLE* pBuffer14 = pChannel14->m_pBuffer; + const int pChannelIndex15 = activeChannels[15]; + EngineMaster::ChannelInfo* pChannel15 = channels[pChannelIndex15]; + CSAMPLE oldGain15 = (*channelGainCache)[pChannelIndex15]; + CSAMPLE newGain15 = gainCalculator.getGain(pChannel15); + (*channelGainCache)[pChannelIndex15] = newGain15; + CSAMPLE* pBuffer15 = pChannel15->m_pBuffer; + const int pChannelIndex16 = activeChannels[16]; + EngineMaster::ChannelInfo* pChannel16 = channels[pChannelIndex16]; + CSAMPLE oldGain16 = (*channelGainCache)[pChannelIndex16]; + CSAMPLE newGain16 = gainCalculator.getGain(pChannel16); + (*channelGainCache)[pChannelIndex16] = newGain16; + CSAMPLE* pBuffer16 = pChannel16->m_pBuffer; + const int pChannelIndex17 = activeChannels[17]; + EngineMaster::ChannelInfo* pChannel17 = channels[pChannelIndex17]; + CSAMPLE oldGain17 = (*channelGainCache)[pChannelIndex17]; + CSAMPLE newGain17 = gainCalculator.getGain(pChannel17); + (*channelGainCache)[pChannelIndex17] = newGain17; + CSAMPLE* pBuffer17 = pChannel17->m_pBuffer; + const int pChannelIndex18 = activeChannels[18]; + EngineMaster::ChannelInfo* pChannel18 = channels[pChannelIndex18]; + CSAMPLE oldGain18 = (*channelGainCache)[pChannelIndex18]; + CSAMPLE newGain18 = gainCalculator.getGain(pChannel18); + (*channelGainCache)[pChannelIndex18] = newGain18; + CSAMPLE* pBuffer18 = pChannel18->m_pBuffer; + const int pChannelIndex19 = activeChannels[19]; + EngineMaster::ChannelInfo* pChannel19 = channels[pChannelIndex19]; + CSAMPLE oldGain19 = (*channelGainCache)[pChannelIndex19]; + CSAMPLE newGain19 = gainCalculator.getGain(pChannel19); + (*channelGainCache)[pChannelIndex19] = newGain19; + CSAMPLE* pBuffer19 = pChannel19->m_pBuffer; + const int pChannelIndex20 = activeChannels[20]; + EngineMaster::ChannelInfo* pChannel20 = channels[pChannelIndex20]; + CSAMPLE oldGain20 = (*channelGainCache)[pChannelIndex20]; + CSAMPLE newGain20 = gainCalculator.getGain(pChannel20); + (*channelGainCache)[pChannelIndex20] = newGain20; + CSAMPLE* pBuffer20 = pChannel20->m_pBuffer; + const int pChannelIndex21 = activeChannels[21]; + EngineMaster::ChannelInfo* pChannel21 = channels[pChannelIndex21]; + CSAMPLE oldGain21 = (*channelGainCache)[pChannelIndex21]; + CSAMPLE newGain21 = gainCalculator.getGain(pChannel21); + (*channelGainCache)[pChannelIndex21] = newGain21; + CSAMPLE* pBuffer21 = pChannel21->m_pBuffer; + const int pChannelIndex22 = activeChannels[22]; + EngineMaster::ChannelInfo* pChannel22 = channels[pChannelIndex22]; + CSAMPLE oldGain22 = (*channelGainCache)[pChannelIndex22]; + CSAMPLE newGain22 = gainCalculator.getGain(pChannel22); + (*channelGainCache)[pChannelIndex22] = newGain22; + CSAMPLE* pBuffer22 = pChannel22->m_pBuffer; + const int pChannelIndex23 = activeChannels[23]; + EngineMaster::ChannelInfo* pChannel23 = channels[pChannelIndex23]; + CSAMPLE oldGain23 = (*channelGainCache)[pChannelIndex23]; + CSAMPLE newGain23 = gainCalculator.getGain(pChannel23); + (*channelGainCache)[pChannelIndex23] = newGain23; + CSAMPLE* pBuffer23 = pChannel23->m_pBuffer; + const int pChannelIndex24 = activeChannels[24]; + EngineMaster::ChannelInfo* pChannel24 = channels[pChannelIndex24]; + CSAMPLE oldGain24 = (*channelGainCache)[pChannelIndex24]; + CSAMPLE newGain24 = gainCalculator.getGain(pChannel24); + (*channelGainCache)[pChannelIndex24] = newGain24; + CSAMPLE* pBuffer24 = pChannel24->m_pBuffer; + const int pChannelIndex25 = activeChannels[25]; + EngineMaster::ChannelInfo* pChannel25 = channels[pChannelIndex25]; + CSAMPLE oldGain25 = (*channelGainCache)[pChannelIndex25]; + CSAMPLE newGain25 = gainCalculator.getGain(pChannel25); + (*channelGainCache)[pChannelIndex25] = newGain25; + CSAMPLE* pBuffer25 = pChannel25->m_pBuffer; + const int pChannelIndex26 = activeChannels[26]; + EngineMaster::ChannelInfo* pChannel26 = channels[pChannelIndex26]; + CSAMPLE oldGain26 = (*channelGainCache)[pChannelIndex26]; + CSAMPLE newGain26 = gainCalculator.getGain(pChannel26); + (*channelGainCache)[pChannelIndex26] = newGain26; + CSAMPLE* pBuffer26 = pChannel26->m_pBuffer; + const int pChannelIndex27 = activeChannels[27]; + EngineMaster::ChannelInfo* pChannel27 = channels[pChannelIndex27]; + CSAMPLE oldGain27 = (*channelGainCache)[pChannelIndex27]; + CSAMPLE newGain27 = gainCalculator.getGain(pChannel27); + (*channelGainCache)[pChannelIndex27] = newGain27; + CSAMPLE* pBuffer27 = pChannel27->m_pBuffer; + const int pChannelIndex28 = activeChannels[28]; + EngineMaster::ChannelInfo* pChannel28 = channels[pChannelIndex28]; + CSAMPLE oldGain28 = (*channelGainCache)[pChannelIndex28]; + CSAMPLE newGain28 = gainCalculator.getGain(pChannel28); + (*channelGainCache)[pChannelIndex28] = newGain28; + CSAMPLE* pBuffer28 = pChannel28->m_pBuffer; + const int pChannelIndex29 = activeChannels[29]; + EngineMaster::ChannelInfo* pChannel29 = channels[pChannelIndex29]; + CSAMPLE oldGain29 = (*channelGainCache)[pChannelIndex29]; + CSAMPLE newGain29 = gainCalculator.getGain(pChannel29); + (*channelGainCache)[pChannelIndex29] = newGain29; + CSAMPLE* pBuffer29 = pChannel29->m_pBuffer; + const int pChannelIndex30 = activeChannels[30]; + EngineMaster::ChannelInfo* pChannel30 = channels[pChannelIndex30]; + CSAMPLE oldGain30 = (*channelGainCache)[pChannelIndex30]; + CSAMPLE newGain30 = gainCalculator.getGain(pChannel30); + (*channelGainCache)[pChannelIndex30] = newGain30; + CSAMPLE* pBuffer30 = pChannel30->m_pBuffer; + const int pChannelIndex31 = activeChannels[31]; + EngineMaster::ChannelInfo* pChannel31 = channels[pChannelIndex31]; + CSAMPLE oldGain31 = (*channelGainCache)[pChannelIndex31]; + CSAMPLE newGain31 = gainCalculator.getGain(pChannel31); + (*channelGainCache)[pChannelIndex31] = newGain31; + CSAMPLE* pBuffer31 = pChannel31->m_pBuffer; + SampleUtil::copy32WithRampingGain(pOutput, + pBuffer0, oldGain0, newGain0, + pBuffer1, oldGain1, newGain1, + pBuffer2, oldGain2, newGain2, + pBuffer3, oldGain3, newGain3, + pBuffer4, oldGain4, newGain4, + pBuffer5, oldGain5, newGain5, + pBuffer6, oldGain6, newGain6, + pBuffer7, oldGain7, newGain7, + pBuffer8, oldGain8, newGain8, + pBuffer9, oldGain9, newGain9, + pBuffer10, oldGain10, newGain10, + pBuffer11, oldGain11, newGain11, + pBuffer12, oldGain12, newGain12, + pBuffer13, oldGain13, newGain13, + pBuffer14, oldGain14, newGain14, + pBuffer15, oldGain15, newGain15, + pBuffer16, oldGain16, newGain16, + pBuffer17, oldGain17, newGain17, + pBuffer18, oldGain18, newGain18, + pBuffer19, oldGain19, newGain19, + pBuffer20, oldGain20, newGain20, + pBuffer21, oldGain21, newGain21, + pBuffer22, oldGain22, newGain22, + pBuffer23, oldGain23, newGain23, + pBuffer24, oldGain24, newGain24, + pBuffer25, oldGain25, newGain25, + pBuffer26, oldGain26, newGain26, + pBuffer27, oldGain27, newGain27, + pBuffer28, oldGain28, newGain28, + pBuffer29, oldGain29, newGain29, + pBuffer30, oldGain30, newGain30, + pBuffer31, oldGain31, newGain31, + iBufferSize); + } else { + // Set pOutput to all 0s + SampleUtil::applyGain(pOutput, 0.0f, iBufferSize); + for (unsigned int i = 0; i < maxChannels; ++i) { + if (channelBitvector & (1 << i)) { + EngineMaster::ChannelInfo* pChannelInfo = channels[i]; + CSAMPLE* pBuffer = pChannelInfo->m_pBuffer; + CSAMPLE gain = gainCalculator.getGain(pChannelInfo); + SampleUtil::addWithGain(pOutput, pBuffer, gain, iBufferSize); + } + } + } +} diff --git a/src/engine/enginechannel.cpp b/src/engine/enginechannel.cpp index 4399034c995..cb1c37c2043 100644 --- a/src/engine/enginechannel.cpp +++ b/src/engine/enginechannel.cpp @@ -49,7 +49,7 @@ bool EngineChannel::isMaster() { return m_pMaster->get() > 0.0; } -EngineChannel::ChannelOrientation EngineChannel::getOrientation() { +EngineChannel::ChannelOrientation EngineChannel::getOrientation() const { double dOrientation = m_pOrientation->get(); if (dOrientation == LEFT) { return LEFT; diff --git a/src/engine/enginechannel.h b/src/engine/enginechannel.h index b9d9211a707..98a5ef29a5f 100644 --- a/src/engine/enginechannel.h +++ b/src/engine/enginechannel.h @@ -45,7 +45,7 @@ class EngineChannel : public EngineObject { EngineChannel(const char *pGroup, ChannelOrientation defaultOrientation = CENTER); virtual ~EngineChannel(); - virtual ChannelOrientation getOrientation(); + virtual ChannelOrientation getOrientation() const; virtual const QString& getGroup() const; virtual bool isActive() = 0; diff --git a/src/engine/enginefilterblock.cpp b/src/engine/enginefilterblock.cpp index 056fb0d88f4..dc85e724082 100644 --- a/src/engine/enginefilterblock.cpp +++ b/src/engine/enginefilterblock.cpp @@ -88,6 +88,8 @@ EngineFilterBlock::EngineFilterBlock(const char * group) memset(m_pTemp1, 0, sizeof(CSAMPLE) * MAX_BUFFER_LEN); memset(m_pTemp2, 0, sizeof(CSAMPLE) * MAX_BUFFER_LEN); memset(m_pTemp3, 0, sizeof(CSAMPLE) * MAX_BUFFER_LEN); + + old_low = old_mid = old_high = 1.0; } EngineFilterBlock::~EngineFilterBlock() @@ -166,9 +168,20 @@ void EngineFilterBlock::process(const CSAMPLE * pIn, const CSAMPLE * pOut, const band->process(pIn, m_pTemp2, iBufferSize); high->process(pIn, m_pTemp3, iBufferSize); - SampleUtil::copy3WithGain(pOutput, - m_pTemp1, fLow, - m_pTemp2, fMid, - m_pTemp3, fHigh, iBufferSize); -} + if (fLow != old_low || fMid != old_mid || fHigh != old_high) { + SampleUtil::copy3WithRampingGain(pOutput, + m_pTemp1, old_low, fLow, + m_pTemp2, old_mid, fMid, + m_pTemp3, old_high, fHigh, + iBufferSize); + } else { + SampleUtil::copy3WithGain(pOutput, + m_pTemp1, fLow, + m_pTemp2, fMid, + m_pTemp3, fHigh, iBufferSize); + } + old_low = fLow; + old_mid = fMid; + old_high = fHigh; +} diff --git a/src/engine/enginefilterblock.h b/src/engine/enginefilterblock.h index a18e4c543cd..1b0aa018981 100644 --- a/src/engine/enginefilterblock.h +++ b/src/engine/enginefilterblock.h @@ -52,6 +52,8 @@ class EngineFilterBlock : public EngineObject static ControlPotmeter *s_loEqFreq, *s_hiEqFreq; static ControlPushButton *s_lofiEq; + double old_low, old_mid, old_high; + int ilowFreq, ihighFreq; bool blofi; }; diff --git a/src/engine/enginemaster.cpp b/src/engine/enginemaster.cpp index 4940fcc95aa..7606f1456ab 100644 --- a/src/engine/enginemaster.cpp +++ b/src/engine/enginemaster.cpp @@ -35,6 +35,7 @@ #include "sampleutil.h" #include "util/timer.h" #include "playermanager.h" +#include "engine/channelmixer.h" #ifdef __LADSPA__ #include "engineladspa.h" @@ -42,7 +43,9 @@ EngineMaster::EngineMaster(ConfigObject * _config, const char * group, - bool bEnableSidechain) { + bool bEnableSidechain) + : m_headphoneMasterGainOld(0), + m_headphoneVolumeOld(0) { m_pWorkerScheduler = new EngineWorkerScheduler(this); m_pWorkerScheduler->start(); @@ -159,169 +162,6 @@ const CSAMPLE* EngineMaster::getHeadphoneBuffer() const return m_pHead; } -void EngineMaster::mixChannels(unsigned int channelBitvector, unsigned int maxChannels, - CSAMPLE* pOutput, unsigned int iBufferSize, - GainCalculator* pGainCalculator) { - // Common case: 2 decks, 4 samplers, 1 mic - ChannelInfo* pChannel1 = NULL; - ChannelInfo* pChannel2 = NULL; - ChannelInfo* pChannel3 = NULL; - ChannelInfo* pChannel4 = NULL; - ChannelInfo* pChannel5 = NULL; - ChannelInfo* pChannel6 = NULL; - ChannelInfo* pChannel7 = NULL; - - unsigned int totalActive = 0; - for (unsigned int i = 0; i < maxChannels; ++i) { - if ((channelBitvector & (1 << i)) == 0) { - continue; - } - - ++totalActive; - - if (pChannel1 == NULL) { - pChannel1 = m_channels[i]; - } else if (pChannel2 == NULL) { - pChannel2 = m_channels[i]; - } else if (pChannel3 == NULL) { - pChannel3 = m_channels[i]; - } else if (pChannel4 == NULL) { - pChannel4 = m_channels[i]; - } else if (pChannel5 == NULL) { - pChannel5 = m_channels[i]; - } else if (pChannel6 == NULL) { - pChannel6 = m_channels[i]; - } else if (pChannel7 == NULL) { - pChannel7 = m_channels[i]; - } - } - - ScopedTimer t(QString("EngineMaster::mixChannels_%1active").arg(totalActive)); - - if (totalActive == 0) { - SampleUtil::applyGain(pOutput, 0.0f, iBufferSize); - } else if (totalActive == 1) { - CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; - double gain1 = pGainCalculator->getGain(pChannel1); - SampleUtil::copyWithGain(pOutput, - pBuffer1, gain1, - iBufferSize); - } else if (totalActive == 2) { - CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; - double gain1 = pGainCalculator->getGain(pChannel1); - CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; - double gain2 = pGainCalculator->getGain(pChannel2); - SampleUtil::copy2WithGain(pOutput, - pBuffer1, gain1, - pBuffer2, gain2, - iBufferSize); - } else if (totalActive == 3) { - CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; - double gain1 = pGainCalculator->getGain(pChannel1); - CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; - double gain2 = pGainCalculator->getGain(pChannel2); - CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; - double gain3 = pGainCalculator->getGain(pChannel3); - - SampleUtil::copy3WithGain(pOutput, - pBuffer1, gain1, - pBuffer2, gain2, - pBuffer3, gain3, - iBufferSize); - } else if (totalActive == 4) { - CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; - double gain1 = pGainCalculator->getGain(pChannel1); - CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; - double gain2 = pGainCalculator->getGain(pChannel2); - CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; - double gain3 = pGainCalculator->getGain(pChannel3); - CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; - double gain4 = pGainCalculator->getGain(pChannel4); - SampleUtil::copy4WithGain(pOutput, - pBuffer1, gain1, - pBuffer2, gain2, - pBuffer3, gain3, - pBuffer4, gain4, - iBufferSize); - } else if (totalActive == 5) { - CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; - double gain1 = pGainCalculator->getGain(pChannel1); - CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; - double gain2 = pGainCalculator->getGain(pChannel2); - CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; - double gain3 = pGainCalculator->getGain(pChannel3); - CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; - double gain4 = pGainCalculator->getGain(pChannel4); - CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; - double gain5 = pGainCalculator->getGain(pChannel5); - - SampleUtil::copy5WithGain(pOutput, - pBuffer1, gain1, - pBuffer2, gain2, - pBuffer3, gain3, - pBuffer4, gain4, - pBuffer5, gain5, - iBufferSize); - } else if (totalActive == 6) { - CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; - double gain1 = pGainCalculator->getGain(pChannel1); - CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; - double gain2 = pGainCalculator->getGain(pChannel2); - CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; - double gain3 = pGainCalculator->getGain(pChannel3); - CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; - double gain4 = pGainCalculator->getGain(pChannel4); - CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; - double gain5 = pGainCalculator->getGain(pChannel5); - CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; - double gain6 = pGainCalculator->getGain(pChannel6); - SampleUtil::copy6WithGain(pOutput, - pBuffer1, gain1, - pBuffer2, gain2, - pBuffer3, gain3, - pBuffer4, gain4, - pBuffer5, gain5, - pBuffer6, gain6, - iBufferSize); - } else if (totalActive == 7) { - CSAMPLE* pBuffer1 = pChannel1->m_pBuffer; - double gain1 = pGainCalculator->getGain(pChannel1); - CSAMPLE* pBuffer2 = pChannel2->m_pBuffer; - double gain2 = pGainCalculator->getGain(pChannel2); - CSAMPLE* pBuffer3 = pChannel3->m_pBuffer; - double gain3 = pGainCalculator->getGain(pChannel3); - CSAMPLE* pBuffer4 = pChannel4->m_pBuffer; - double gain4 = pGainCalculator->getGain(pChannel4); - CSAMPLE* pBuffer5 = pChannel5->m_pBuffer; - double gain5 = pGainCalculator->getGain(pChannel5); - CSAMPLE* pBuffer6 = pChannel6->m_pBuffer; - double gain6 = pGainCalculator->getGain(pChannel6); - CSAMPLE* pBuffer7 = pChannel7->m_pBuffer; - double gain7 = pGainCalculator->getGain(pChannel7); - SampleUtil::copy7WithGain(pOutput, - pBuffer1, gain1, - pBuffer2, gain2, - pBuffer3, gain3, - pBuffer4, gain4, - pBuffer5, gain5, - pBuffer6, gain6, - pBuffer7, gain7, - iBufferSize); - } else { - // Set pOutput to all 0s - SampleUtil::applyGain(pOutput, 0.0f, iBufferSize); - - for (unsigned int i = 0; i < maxChannels; ++i) { - if (channelBitvector & (1 << i)) { - ChannelInfo* pChannelInfo = m_channels[i]; - CSAMPLE* pBuffer = pChannelInfo->m_pBuffer; - double gain = pGainCalculator->getGain(pChannelInfo); - SampleUtil::addWithGain(pOutput, pBuffer, gain, iBufferSize); - } - } - } -} - void EngineMaster::process(const CSAMPLE *, const CSAMPLE *pOut, const int iBufferSize) { static bool haveSetName = false; if (!haveSetName) { @@ -381,7 +221,10 @@ void EngineMaster::process(const CSAMPLE *, const CSAMPLE *pOut, const int iBuff // Mix all the enabled headphone channels together. m_headphoneGain.setGain(chead_gain); - mixChannels(headphoneOutput, maxChannels, m_pHead, iBufferSize, &m_headphoneGain); + + ChannelMixer::mixChannels(m_channels, m_headphoneGain, headphoneOutput, + maxChannels, &m_channelHeadphoneGainCache, + m_pHead, iBufferSize); // Calculate the crossfader gains for left and right side of the crossfader double c1_gain, c2_gain; @@ -395,7 +238,9 @@ void EngineMaster::process(const CSAMPLE *, const CSAMPLE *pOut, const int iBuff m_masterGain.setGains(m_pMasterVolume->get(), c1_gain, 1.0, c2_gain); // Perform the master mix - mixChannels(masterOutput, maxChannels, m_pMaster, iBufferSize, &m_masterGain); + ChannelMixer::mixChannels(m_channels, m_masterGain, masterOutput, + maxChannels, &m_channelMasterGainCache, + m_pMaster, iBufferSize); #ifdef __LADSPA__ // LADPSA master effects @@ -429,10 +274,14 @@ void EngineMaster::process(const CSAMPLE *, const CSAMPLE *pOut, const int iBuff } // Add master to headphone with appropriate gain - SampleUtil::addWithGain(m_pHead, m_pMaster, cmaster_gain, iBufferSize); + SampleUtil::addWithRampingGain(m_pHead, m_pMaster, m_headphoneMasterGainOld, + cmaster_gain, iBufferSize); + m_headphoneMasterGainOld = cmaster_gain; // Head volume and clipping - SampleUtil::applyGain(m_pHead, m_pHeadVolume->get(), iBufferSize); + CSAMPLE headphoneVolume = m_pHeadVolume->get(); + SampleUtil::applyRampingGain(m_pHead, m_headphoneVolumeOld, headphoneVolume, iBufferSize); + m_headphoneVolumeOld = headphoneVolume; head_clipping->process(m_pHead, m_pHead, iBufferSize); //Master/headphones interleaving is now done in @@ -453,6 +302,8 @@ void EngineMaster::addChannel(EngineChannel* pChannel) { pChannelInfo->m_pBuffer = SampleUtil::alloc(MAX_BUFFER_LEN); SampleUtil::applyGain(pChannelInfo->m_pBuffer, 0, MAX_BUFFER_LEN); m_channels.push_back(pChannelInfo); + m_channelMasterGainCache.push_back(0); + m_channelHeadphoneGainCache.push_back(0); EngineBuffer* pBuffer = pChannelInfo->m_pChannel->getEngineBuffer(); if (pBuffer != NULL) { diff --git a/src/engine/enginemaster.h b/src/engine/enginemaster.h index 0087c80315a..96c28983315 100644 --- a/src/engine/enginemaster.h +++ b/src/engine/enginemaster.h @@ -18,8 +18,6 @@ #ifndef ENGINEMASTER_H #define ENGINEMASTER_H -#include - #include "controlobject.h" #include "engine/engineobject.h" #include "engine/enginechannel.h" @@ -84,7 +82,6 @@ class EngineMaster : public EngineObject, public AudioSource { return m_pSideChain; } - private: struct ChannelInfo { EngineChannel* m_pChannel; CSAMPLE* m_pBuffer; @@ -93,11 +90,11 @@ class EngineMaster : public EngineObject, public AudioSource { class GainCalculator { public: - virtual double getGain(ChannelInfo* pChannelInfo) = 0; + virtual double getGain(ChannelInfo* pChannelInfo) const = 0; }; class ConstantGainCalculator : public GainCalculator { public: - inline double getGain(ChannelInfo* pChannelInfo) { + inline double getGain(ChannelInfo* pChannelInfo) const { Q_UNUSED(pChannelInfo); return m_dGain; } @@ -109,12 +106,16 @@ class EngineMaster : public EngineObject, public AudioSource { }; class OrientationVolumeGainCalculator : public GainCalculator { public: - inline double getGain(ChannelInfo* pChannelInfo) { - double channelVolume = pChannelInfo->m_pVolumeControl->get(); - double orientationGain = EngineMaster::gainForOrientation( + OrientationVolumeGainCalculator() + : m_dVolume(1.0), m_dLeftGain(1.0), m_dCenterGain(1.0), m_dRightGain(1.0) { } + + inline double getGain(ChannelInfo* pChannelInfo) const { + const double channelVolume = pChannelInfo->m_pVolumeControl->get(); + const double orientationGain = EngineMaster::gainForOrientation( pChannelInfo->m_pChannel->getOrientation(), m_dLeftGain, m_dCenterGain, m_dRightGain); - return m_dVolume * channelVolume * orientationGain; + const double gain = m_dVolume * channelVolume * orientationGain; + return gain; } inline void setGains(double dVolume, double leftGain, double centerGain, double rightGain) { @@ -123,14 +124,14 @@ class EngineMaster : public EngineObject, public AudioSource { m_dCenterGain = centerGain; m_dRightGain = rightGain; } + private: double m_dVolume, m_dLeftGain, m_dCenterGain, m_dRightGain; }; - void mixChannels(unsigned int channelBitvector, unsigned int maxChannels, - CSAMPLE* pOutput, unsigned int iBufferSize, GainCalculator* pGainCalculator); - QList m_channels; + QList m_channelMasterGainCache; + QList m_channelHeadphoneGainCache; CSAMPLE *m_pMaster, *m_pHead; @@ -156,6 +157,8 @@ class EngineMaster : public EngineObject, public AudioSource { ConstantGainCalculator m_headphoneGain; OrientationVolumeGainCalculator m_masterGain; + CSAMPLE m_headphoneMasterGainOld; + CSAMPLE m_headphoneVolumeOld; }; #endif diff --git a/src/engine/enginepregain.cpp b/src/engine/enginepregain.cpp index 728672b2446..7b181747219 100644 --- a/src/engine/enginepregain.cpp +++ b/src/engine/enginepregain.cpp @@ -44,6 +44,8 @@ EnginePregain::EnginePregain(const char * group) s_pEnableReplayGain = new ControlObject(ConfigKey("[ReplayGain]", "ReplayGainEnabled")); } m_bSmoothFade = false; + + m_fPrevGain = 1.0; } EnginePregain::~EnginePregain() @@ -114,6 +116,12 @@ void EnginePregain::process(const CSAMPLE * pIn, const CSAMPLE * pOut, const int m_pTotalGain->set(fGain); - // SampleUtil deals with aliased buffers and gains of 1 or 0. - SampleUtil::copyWithGain(pOutput, pIn, fGain, iBufferSize); + if (fGain != m_fPrevGain) { + // Prevent soundwave discontinuities by interpolating from old to new gain. + SampleUtil::copyWithRampingGain(pOutput, pIn, m_fPrevGain, fGain, iBufferSize); + } else { + // SampleUtil deals with aliased buffers and gains of 1 or 0. + SampleUtil::copyWithGain(pOutput, pIn, fGain, iBufferSize); + } + m_fPrevGain = fGain; } diff --git a/src/engine/enginepregain.h b/src/engine/enginepregain.h index de3490ce971..5f3b0ded9ce 100644 --- a/src/engine/enginepregain.h +++ b/src/engine/enginepregain.h @@ -33,6 +33,7 @@ class EnginePregain : public EngineObject private: + float m_fPrevGain; ControlLogpotmeter *potmeterPregain; ControlObject *m_pTotalGain; ControlObject *m_pControlReplayGain; diff --git a/src/sampleutil.cpp b/src/sampleutil.cpp index 9654df0824d..5b13cd12f07 100644 --- a/src/sampleutil.cpp +++ b/src/sampleutil.cpp @@ -1,10 +1,6 @@ // sampleutil.cpp // Created 10/5/2009 by RJ Ryan (rryan@mit.edu) -#ifdef __SSE__ -#include -#endif - #ifdef __WINDOWS__ #pragma intrinsic(fabs)sc typedef __int64 int64_t; @@ -15,14 +11,6 @@ typedef __int32 int32_t; #include "sampleutil.h" -#ifdef __SSE__ -// Disable optimizations by default. They aren't ready for general use yet. Turn -// this flag on if you feel brave. -bool SampleUtil::m_sOptimizationsOn = false; // true; -#else -bool SampleUtil::m_sOptimizationsOn = false; -#endif - // static CSAMPLE* SampleUtil::alloc(int size) { // TODO(XXX) align the array @@ -43,52 +31,37 @@ void SampleUtil::applyGain(CSAMPLE* pBuffer, return; } - if (m_sOptimizationsOn) { - return sseApplyGain(pBuffer, gain, iNumSamples); - } - for (int i = 0; i < iNumSamples; ++i) { pBuffer[i] *= gain; } } // static -void SampleUtil::sseApplyGain(_ALIGN_16 CSAMPLE* pBuffer, - _ALIGN_16 CSAMPLE gain, int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pBuffer); - __m128 vSamples; - __m128 vGain = _mm_set1_ps(gain); - while (iNumSamples >= 4) { - vSamples = _mm_loadu_ps(pBuffer); - vSamples = _mm_mul_ps(vSamples, vGain); - _mm_store_ps(pBuffer, vSamples); - - iNumSamples -= 4; - pBuffer += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; +void SampleUtil::applyRampingGain(CSAMPLE* pBuffer, + CSAMPLE old_gain, CSAMPLE new_gain, int iNumSamples) { + if (old_gain == 1.0f && new_gain == 1.0f) + return; + if (old_gain == 0.0f && new_gain == 0.0f) { + memset(pBuffer, 0, sizeof(pBuffer[0]) * iNumSamples); + return; } - while (iNumSamples > 0) { - *pBuffer = *pBuffer * gain; - pBuffer++; - iNumSamples--; + + const CSAMPLE delta = 2.0 * (new_gain - old_gain) / iNumSamples; + CSAMPLE gain = old_gain; + for (int i = 0; i < iNumSamples; i += 2, gain += delta) { + pBuffer[i] *= gain; + pBuffer[i + 1] *= gain; } -#endif } // static void SampleUtil::applyAlternatingGain(CSAMPLE* pBuffer, CSAMPLE gain1, CSAMPLE gain2, int iNumSamples) { - Q_ASSERT(iNumSamples % 2 == 0); // This handles gain1 == 1.0 && gain2 == 1.0f as well. if (gain1 == gain2) { return applyGain(pBuffer, gain1, iNumSamples); } - if (m_sOptimizationsOn) - return sseApplyAlternatingGain(pBuffer, gain1, gain2, iNumSamples); for (int i = 0; i < iNumSamples; i += 2) { pBuffer[i] *= gain1; @@ -96,77 +69,29 @@ void SampleUtil::applyAlternatingGain(CSAMPLE* pBuffer, } } -// static -void SampleUtil::sseApplyAlternatingGain(CSAMPLE* pBuffer, - CSAMPLE gain1, CSAMPLE gain2, - int iNumSamples) { -#ifdef __SSE__ - Q_ASSERT(iNumSamples % 2 == 0); - assert_aligned(pBuffer); - __m128 vSamples; - __m128 vGain = _mm_set_ps(gain2, gain1, gain2, gain1); - while (iNumSamples >= 4) { - vSamples = _mm_loadu_ps(pBuffer); - vSamples = _mm_mul_ps(vSamples, vGain); - _mm_store_ps(pBuffer, vSamples); - - iNumSamples -= 4; - pBuffer += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - *pBuffer = *pBuffer * gain1; - pBuffer++; - *pBuffer = *pBuffer * gain2; - pBuffer++; - iNumSamples -= 2; - } -#endif -} - // static void SampleUtil::addWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, CSAMPLE gain, int iNumSamples) { if (gain == 0.0f) return; - if (m_sOptimizationsOn) - return sseAddWithGain(pDest, pSrc, gain, iNumSamples); for (int i = 0; i < iNumSamples; ++i) { pDest[i] += pSrc[i] * gain; } } -// static -void SampleUtil::sseAddWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, - CSAMPLE gain, int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pDest); - assert_aligned(pSrc); - __m128 vSrcSamples; - __m128 vDestSamples; - __m128 vGain = _mm_set1_ps(gain); - while (iNumSamples >= 4) { - vSrcSamples = _mm_loadu_ps(pSrc); - vSrcSamples = _mm_mul_ps(vSrcSamples, vGain); - vDestSamples = _mm_loadu_ps(pDest); - _mm_store_ps(pDest, _mm_add_ps(vDestSamples, vSrcSamples)); - iNumSamples -= 4; - pDest += 4; - pSrc += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; +void SampleUtil::addWithRampingGain(CSAMPLE* pDest, const CSAMPLE* pSrc, + CSAMPLE old_gain, CSAMPLE new_gain, int iNumSamples) { + if (old_gain == 0.0f && new_gain == 0.0f) { + return; } - while (iNumSamples > 0) { - *pDest = *pDest + *pSrc * gain; - pDest++; - pSrc++; - iNumSamples--; + + const CSAMPLE delta = 2.0 * (new_gain - old_gain) / iNumSamples; + CSAMPLE gain = old_gain; + for (int i = 0; i < iNumSamples; i += 2, gain += delta) { + pDest[i] += pSrc[i] * gain; + pDest[i + 1] += pSrc[i + 1] * gain; } -#endif } // static @@ -180,55 +105,11 @@ void SampleUtil::add2WithGain(CSAMPLE* pDest, return addWithGain(pDest, pSrc1, gain1, iNumSamples); } - if (m_sOptimizationsOn) - return sseAdd2WithGain(pDest, pSrc1, gain1, pSrc2, gain2, iNumSamples); - for (int i = 0; i < iNumSamples; ++i) { pDest[i] += pSrc1[i] * gain1 + pSrc2[i] * gain2; } } -// static -void SampleUtil::sseAdd2WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pSrc1); - assert_aligned(pSrc2); - assert_aligned(pDest); - __m128 vSrc1Samples; - __m128 vSrc2Samples; - __m128 vDestSamples; - __m128 vGain1 = _mm_set1_ps(gain1); - __m128 vGain2 = _mm_set1_ps(gain2); - while (iNumSamples >= 4) { - vSrc1Samples = _mm_loadu_ps(pSrc1); - vSrc1Samples = _mm_mul_ps(vSrc1Samples, vGain1); - vSrc2Samples = _mm_loadu_ps(pSrc2); - vSrc2Samples = _mm_mul_ps(vSrc2Samples, vGain2); - vDestSamples = _mm_loadu_ps(pDest); - vDestSamples = _mm_add_ps(vDestSamples, vSrc1Samples); - vDestSamples = _mm_add_ps(vDestSamples, vSrc2Samples); - _mm_store_ps(pDest, vDestSamples); - iNumSamples -= 4; - pDest += 4; - pSrc1 += 4; - pSrc2 += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - *pDest = *pDest + *pSrc1 * gain1 + *pSrc2 * gain2; - pDest++; - pSrc1++; - pSrc2++; - iNumSamples--; - } -#endif -} - // static void SampleUtil::add3WithGain(CSAMPLE* pDest, const CSAMPLE* pSrc1, CSAMPLE gain1, @@ -243,66 +124,11 @@ void SampleUtil::add3WithGain(CSAMPLE* pDest, return add2WithGain(pDest, pSrc1, gain1, pSrc2, gain2, iNumSamples); } - if (m_sOptimizationsOn) - return sseAdd3WithGain(pDest, pSrc1, gain1, pSrc2, gain2, - pSrc3, gain3, iNumSamples); - for (int i = 0; i < iNumSamples; ++i) { pDest[i] += pSrc1[i] * gain1 + pSrc2[i] * gain2 + pSrc3[i] * gain3; } } -// static -void SampleUtil::sseAdd3WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pDest); - assert_aligned(pSrc1); - assert_aligned(pSrc2); - assert_aligned(pSrc3); - __m128 vSrc1Samples; - __m128 vSrc2Samples; - __m128 vSrc3Samples; - __m128 vDestSamples; - __m128 vGain1 = _mm_set1_ps(gain1); - __m128 vGain2 = _mm_set1_ps(gain2); - __m128 vGain3 = _mm_set1_ps(gain3); - while (iNumSamples >= 4) { - vSrc1Samples = _mm_loadu_ps(pSrc1); - vSrc1Samples = _mm_mul_ps(vSrc1Samples, vGain1); - vSrc2Samples = _mm_loadu_ps(pSrc2); - vSrc2Samples = _mm_mul_ps(vSrc2Samples, vGain2); - vSrc3Samples = _mm_loadu_ps(pSrc3); - vSrc3Samples = _mm_mul_ps(vSrc3Samples, vGain3); - vDestSamples = _mm_loadu_ps(pDest); - vDestSamples = _mm_add_ps(vDestSamples, vSrc1Samples); - vDestSamples = _mm_add_ps(vDestSamples, vSrc2Samples); - vDestSamples = _mm_add_ps(vDestSamples, vSrc3Samples); - _mm_store_ps(pDest, vDestSamples); - iNumSamples -= 4; - pDest += 4; - pSrc1 += 4; - pSrc2 += 4; - pSrc3 += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - *pDest = *pDest + *pSrc1 * gain1 + *pSrc2 * gain2 + *pSrc3 * gain3; - pDest++; - pSrc1++; - pSrc2++; - pSrc3++; - iNumSamples--; - } -#endif -} - - // static void SampleUtil::copyWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, CSAMPLE gain, int iNumSamples) { @@ -318,10 +144,6 @@ void SampleUtil::copyWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, return; } - if (m_sOptimizationsOn) { - return sseCopyWithGain(pDest, pSrc, gain, iNumSamples); - } - for (int i = 0; i < iNumSamples; ++i) { pDest[i] = pSrc[i] * gain; } @@ -332,371 +154,43 @@ void SampleUtil::copyWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, } // static -void SampleUtil::sseCopyWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, - CSAMPLE gain, int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pDest); - assert_aligned(pSrc); - __m128 vSrcSamples; - __m128 vGain = _mm_set1_ps(gain); - while (iNumSamples >= 4) { - vSrcSamples = _mm_loadu_ps(pSrc); - vSrcSamples = _mm_mul_ps(vSrcSamples, vGain); - _mm_store_ps(pDest, vSrcSamples); - iNumSamples -= 4; - pDest += 4; - pSrc += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - *pDest = *pSrc * gain; - pDest++; - pSrc++; - iNumSamples--; - } -#endif -} - - -// static -void SampleUtil::copy2WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - int iNumSamples) { - if (gain1 == 0.0f) { - return copyWithGain(pDest, pSrc2, gain2, iNumSamples); - } - if (gain2 == 0.0f) { - return copyWithGain(pDest, pSrc1, gain1, iNumSamples); - } - if (m_sOptimizationsOn) { - return sseCopy2WithGain(pDest, pSrc1, gain1, pSrc2, gain2, iNumSamples); - } - - for (int i = 0; i < iNumSamples; ++i) { - pDest[i] = pSrc1[i] * gain1 + pSrc2[i] * gain2; - } -} - -// static -void SampleUtil::sseCopy2WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pDest); - assert_aligned(pSrc1); - assert_aligned(pSrc2); - __m128 vSrc1Samples; - __m128 vSrc2Samples; - __m128 vGain1 = _mm_set1_ps(gain1); - __m128 vGain2 = _mm_set1_ps(gain2); - while (iNumSamples >= 4) { - vSrc1Samples = _mm_loadu_ps(pSrc1); - vSrc1Samples = _mm_mul_ps(vSrc1Samples, vGain1); - vSrc2Samples = _mm_loadu_ps(pSrc2); - vSrc2Samples = _mm_mul_ps(vSrc2Samples, vGain2); - _mm_store_ps(pDest, _mm_add_ps(vSrc1Samples, vSrc2Samples)); - iNumSamples -= 4; - pDest += 4; - pSrc1 += 4; - pSrc2 += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - *pDest = *pSrc1 * gain1 + *pSrc2 * gain2; - pDest++; - pSrc1++; - pSrc2++; - iNumSamples--; - } -#endif -} - -// static -void SampleUtil::copy3WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - int iNumSamples) { - if (gain1 == 0.0f) { - return copy2WithGain(pDest, pSrc2, gain2, pSrc3, gain3, iNumSamples); - } - if (gain2 == 0.0f) { - return copy2WithGain(pDest, pSrc1, gain1, pSrc3, gain3, iNumSamples); - } - if (gain3 == 0.0f) { - return copy2WithGain(pDest, pSrc1, gain1, pSrc2, gain2, iNumSamples); - } - if (m_sOptimizationsOn) { - return sseCopy3WithGain(pDest, pSrc1, gain1, pSrc2, gain2, - pSrc3, gain3, iNumSamples); - } - - for (int i = 0; i < iNumSamples; ++i) { - pDest[i] = pSrc1[i] * gain1 + pSrc2[i] * gain2 + pSrc3[i] * gain3; - } -} - -// static -void SampleUtil::sseCopy3WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pDest); - assert_aligned(pSrc1); - assert_aligned(pSrc2); - assert_aligned(pSrc3); - __m128 vSrc1Samples; - __m128 vSrc2Samples; - __m128 vSrc3Samples; - __m128 vGain1 = _mm_set1_ps(gain1); - __m128 vGain2 = _mm_set1_ps(gain2); - __m128 vGain3 = _mm_set1_ps(gain3); - while (iNumSamples >= 4) { - vSrc1Samples = _mm_loadu_ps(pSrc1); - vSrc1Samples = _mm_mul_ps(vSrc1Samples, vGain1); - vSrc2Samples = _mm_loadu_ps(pSrc2); - vSrc2Samples = _mm_mul_ps(vSrc2Samples, vGain2); - vSrc3Samples = _mm_loadu_ps(pSrc3); - vSrc3Samples = _mm_mul_ps(vSrc3Samples, vGain3); - - vSrc1Samples = _mm_add_ps(vSrc1Samples, vSrc2Samples); - vSrc1Samples = _mm_add_ps(vSrc1Samples, vSrc3Samples); - _mm_store_ps(pDest, vSrc1Samples); - iNumSamples -= 4; - pDest += 4; - pSrc1 += 4; - pSrc2 += 4; - pSrc3 += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - *pDest = *pSrc1 * gain1 + *pSrc2 * gain2 + *pSrc3 * gain3; - pDest++; - pSrc1++; - pSrc2++; - pSrc3++; - iNumSamples--; - } -#endif -} - -// static -void SampleUtil::copy4WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - const CSAMPLE* pSrc4, CSAMPLE gain4, - int iNumSamples) { - if (gain1 == 0.0f) { - return copy3WithGain(pDest, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, iNumSamples); - } - if (gain2 == 0.0f) { - return copy3WithGain(pDest, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, iNumSamples); - } - if (gain3 == 0.0f) { - return copy3WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, iNumSamples); - } - if (gain4 == 0.0f) { - return copy3WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, iNumSamples); - } - if (m_sOptimizationsOn) { - // TODO(rryan) implement SSE for this? worth it? - } - for (int i = 0; i < iNumSamples; ++i) { - pDest[i] = pSrc1[i] * gain1 + pSrc2[i] * gain2 + pSrc3[i] * gain3 + pSrc4[i] * gain4; - } -} - -// static -void SampleUtil::copy5WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - const CSAMPLE* pSrc4, CSAMPLE gain4, - const CSAMPLE* pSrc5, CSAMPLE gain5, - int iNumSamples) { - if (gain1 == 0.0f) { - return copy4WithGain(pDest, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, iNumSamples); - } - if (gain2 == 0.0f) { - return copy4WithGain(pDest, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, iNumSamples); - } - if (gain3 == 0.0f) { - return copy4WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, iNumSamples); - } - if (gain4 == 0.0f) { - return copy4WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, iNumSamples); - } - if (gain5 == 0.0f) { - return copy4WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, iNumSamples); +void SampleUtil::copyWithRampingGain(CSAMPLE* pDest, const CSAMPLE* pSrc, + CSAMPLE old_gain, CSAMPLE new_gain, int iNumSamples) { + if (pDest == pSrc) { + return applyRampingGain(pDest, old_gain, new_gain, iNumSamples); } - - if (m_sOptimizationsOn) { - // TODO(rryan) implement SSE for this? worth it? + if (old_gain == 1.0f && new_gain == 1.0f) { + memcpy(pDest, pSrc, sizeof(pDest[0]) * iNumSamples); + return; } - - for (int i = 0; i < iNumSamples; ++i) { - pDest[i] = pSrc1[i] * gain1 + pSrc2[i] * gain2 + pSrc3[i] * gain3 + pSrc4[i] * gain4 + pSrc5[i] * gain5; + if (old_gain == 0.0f && new_gain == 0.0f) { + memset(pDest, 0, sizeof(pDest[0]) * iNumSamples); + return; } -} -// static -void SampleUtil::copy6WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - const CSAMPLE* pSrc4, CSAMPLE gain4, - const CSAMPLE* pSrc5, CSAMPLE gain5, - const CSAMPLE* pSrc6, CSAMPLE gain6, - int iNumSamples) { - if (gain1 == 0.0f) { - return copy5WithGain(pDest, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, - pSrc5, gain5, pSrc6, gain6, iNumSamples); - } - if (gain2 == 0.0f) { - return copy5WithGain(pDest, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, - pSrc5, gain5, pSrc6, gain6, iNumSamples); - } - if (gain3 == 0.0f) { - return copy5WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, - pSrc5, gain5, pSrc6, gain6, iNumSamples); - } - if (gain4 == 0.0f) { - return copy5WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, - pSrc5, gain5, pSrc6, gain6, iNumSamples); - } - if (gain5 == 0.0f) { - return copy5WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, - pSrc4, gain4, pSrc6, gain6, iNumSamples); - } - if (gain6 == 0.0f) { - return copy5WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, - pSrc4, gain4, pSrc5, gain5, iNumSamples); - } - if (m_sOptimizationsOn) { - // TODO(rryan) implement SSE for this? worth it? - } - for (int i = 0; i < iNumSamples; ++i) { - pDest[i] = pSrc1[i] * gain1 + pSrc2[i] * gain2 + pSrc3[i] * gain3 + - pSrc4[i] * gain4 + pSrc5[i] * gain5 + pSrc6[i] * gain6; + const CSAMPLE delta = 2.0 * (new_gain - old_gain) / iNumSamples; + CSAMPLE gain = old_gain; + for (int i = 0; i < iNumSamples; i += 2, gain += delta) { + pDest[i] = pSrc[i] * gain; + pDest[i + 1] = pSrc[i + 1] * gain; } -} -// static -void SampleUtil::copy7WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - const CSAMPLE* pSrc4, CSAMPLE gain4, - const CSAMPLE* pSrc5, CSAMPLE gain5, - const CSAMPLE* pSrc6, CSAMPLE gain6, - const CSAMPLE* pSrc7, CSAMPLE gain7, - int iNumSamples) { - if (gain1 == 0.0f) { - return copy6WithGain(pDest, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, - pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); - } - if (gain2 == 0.0f) { - return copy6WithGain(pDest, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, - pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); - } - if (gain3 == 0.0f) { - return copy6WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, - pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); - } - if (gain4 == 0.0f) { - return copy6WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, - pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); - } - if (gain5 == 0.0f) { - return copy6WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, - pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, iNumSamples); - } - if (gain6 == 0.0f) { - return copy6WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, - pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, iNumSamples); - } - if (gain7 == 0.0f) { - return copy6WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, - pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, iNumSamples); - } - if (m_sOptimizationsOn) { - // TODO(rryan) implement SSE for this? worth it? - } - for (int i = 0; i < iNumSamples; ++i) { - pDest[i] = pSrc1[i] * gain1 + pSrc2[i] * gain2 + pSrc3[i] * gain3 + - pSrc4[i] * gain4 + pSrc5[i] * gain5 + pSrc6[i] * gain6 + pSrc7[i] * gain7; - } + // OR! need to test which fares better + // memcpy(pDest, pSrc, sizeof(pDest[0]) * iNumSamples); + // applyGain(pDest, gain); } // static void SampleUtil::convert(CSAMPLE* pDest, const SAMPLE* pSrc, int iNumSamples) { - if (m_sOptimizationsOn) { -#ifndef WIN64 // MSVC x64 doesn't support the __m64 type, which _mm_cvtpi16_ps uses - return sseConvert(pDest, pSrc, iNumSamples); -#endif - } - for (int i = 0; i < iNumSamples; ++i) { pDest[i] = pSrc[i]; } } -// static -void SampleUtil::sseConvert(CSAMPLE* pDest, const SAMPLE* pSrc, - int iNumSamples) { -#ifdef __SSE__ -#ifndef WIN64 // MSVC x64 doesn't support the __m64 type, which _mm_cvtpi16_ps uses - assert_aligned(pDest); - assert_aligned(pSrc); - __m64 vSrcSamples; - __m128 vDestSamples; - while (iNumSamples >= 4) { - vSrcSamples = *((__m64*)pSrc); // ???? - vDestSamples = _mm_cvtpi16_ps(vSrcSamples); - - // WTF _mm_cvtpi16_ps randomly shuffles the high 32-bits to the low - // 32-bits. We have to shuffle them back to normal order. - // 0,1,2,3 in produces 2,3,0,1 - vDestSamples = _mm_shuffle_ps(vDestSamples, vDestSamples, _MM_SHUFFLE(1,0,3,2)); - _mm_store_ps(pDest, vDestSamples); - - iNumSamples -= 4; - pDest += 4; - pSrc += 4; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - *pDest = *pSrc; - pDest++; - pSrc++; - iNumSamples--; - } -#endif -#endif -} - // static void SampleUtil::sumAbsPerChannel(CSAMPLE* pfAbsL, CSAMPLE* pfAbsR, const CSAMPLE* pBuffer, int iNumSamples) { - Q_ASSERT(iNumSamples % 2 == 0); - if (m_sOptimizationsOn) { - return sseSumAbsPerChannel(pfAbsL, pfAbsR, pBuffer, iNumSamples); - } - CSAMPLE fAbsL = 0.0f; CSAMPLE fAbsR = 0.0f; @@ -709,54 +203,9 @@ void SampleUtil::sumAbsPerChannel(CSAMPLE* pfAbsL, CSAMPLE* pfAbsR, *pfAbsR = fAbsR; } -void SampleUtil::sseSumAbsPerChannel(CSAMPLE* pfAbsL, CSAMPLE* pfAbsR, - const CSAMPLE* pBuffer, int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pBuffer); - CSAMPLE fAbsL = 0.0f; - CSAMPLE fAbsR = 0.0f; - - __m128 vSrcSamples; - __m128 vSum = _mm_setzero_ps(); - // This mask will clear an IEEE754 float's sign bit - static _ALIGN_16 int32_t l_bitmask[] = - {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff}; - const __m128 vSignMask = _mm_load_ps((float*)l_bitmask); - - while (iNumSamples >= 4) { - vSrcSamples = _mm_loadu_ps(pBuffer); - vSrcSamples = _mm_and_ps(vSrcSamples, vSignMask); - vSum = _mm_add_ps(vSum, vSrcSamples); - iNumSamples -= 4; - pBuffer += 4; - } - - _ALIGN_16 CSAMPLE result[4]; - assert_aligned(result); - _mm_store_ps(result, vSum); - fAbsL = result[0] + result[2]; - fAbsR = result[1] + result[3]; - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples >= 2) { - fAbsL += fabs(*pBuffer++); - fAbsR += fabs(*pBuffer++); - iNumSamples -= 2; - } - - *pfAbsL = fAbsL; - *pfAbsR = fAbsR; -#endif -} - // static bool SampleUtil::isOutsideRange(CSAMPLE fMax, CSAMPLE fMin, const CSAMPLE* pBuffer, int iNumSamples) { - if (m_sOptimizationsOn) { - return sseIsOutsideRange(fMax, fMin, pBuffer, iNumSamples); - } - for (int i = 0; i < iNumSamples; ++i) { CSAMPLE sample = pBuffer[i]; if (sample > fMax) { @@ -768,54 +217,10 @@ bool SampleUtil::isOutsideRange(CSAMPLE fMax, CSAMPLE fMin, return false; } -// static -bool SampleUtil::sseIsOutsideRange(CSAMPLE fMax, CSAMPLE fMin, - const CSAMPLE* pBuffer, int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pBuffer); - __m128 vSrcSamples; - __m128 vClamped = _mm_setzero_ps(); - __m128 vMax = _mm_set1_ps(fMax); - __m128 vMin = _mm_set1_ps(fMin); - while (iNumSamples >= 4) { - vSrcSamples = _mm_loadu_ps(pBuffer); - vClamped = _mm_or_ps(vClamped, _mm_cmplt_ps(vSrcSamples, vMin)); - vClamped = _mm_or_ps(vClamped, _mm_cmpgt_ps(vSrcSamples, vMax)); - iNumSamples -= 4; - pBuffer += 4; - } - _ALIGN_16 CSAMPLE clamp[4]; - assert_aligned(clamp); - _mm_store_ps(clamp, vClamped); - if (clamp[0] != 0 || clamp[1] != 0 || - clamp[2] != 0 || clamp[3] != 0) { - return true; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - CSAMPLE sample = *pBuffer; - if (sample > fMax) { - return true; - } else if (sample < fMin) { - return true; - } - pBuffer++; - iNumSamples--; - } -#endif - return false; -} - // static bool SampleUtil::copyClampBuffer(CSAMPLE fMax, CSAMPLE fMin, CSAMPLE* pDest, const CSAMPLE* pSrc, int iNumSamples) { - if (m_sOptimizationsOn) { - return sseCopyClampBuffer(fMax, fMin, pDest, pSrc, iNumSamples); - } - bool clamped = false; if (pSrc == pDest) { for (int i = 0; i < iNumSamples; ++i) { @@ -844,115 +249,19 @@ bool SampleUtil::copyClampBuffer(CSAMPLE fMax, CSAMPLE fMin, return clamped; } -// static -bool SampleUtil::sseCopyClampBuffer(CSAMPLE fMax, CSAMPLE fMin, - CSAMPLE* pDest, const CSAMPLE* pSrc, - int iNumSamples) { - bool clamped = false; -#ifdef __SSE__ - assert_aligned(pDest); - assert_aligned(pSrc); - __m128 vSrcSamples; - __m128 vClamped = _mm_setzero_ps(); - __m128 vMax = _mm_set1_ps(fMax); - __m128 vMin = _mm_set1_ps(fMin); - while (iNumSamples >= 4) { - vSrcSamples = _mm_loadu_ps(pSrc); - vClamped = _mm_or_ps(vClamped, _mm_cmplt_ps(vSrcSamples, vMin)); - vClamped = _mm_or_ps(vClamped, _mm_cmpgt_ps(vSrcSamples, vMax)); - vSrcSamples = _mm_max_ps(vSrcSamples, vMin); - vSrcSamples = _mm_min_ps(vSrcSamples, vMax); - _mm_store_ps(pDest, vSrcSamples); - iNumSamples -= 4; - pDest += 4; - pSrc += 4; - } - _ALIGN_16 CSAMPLE clamp[4]; - assert_aligned(clamp); - _mm_store_ps(clamp, vClamped); - if (clamp[0] != 0 || clamp[1] != 0 || - clamp[2] != 0 || clamp[3] != 0) { - clamped = true; - } - if (iNumSamples > 0) { - qDebug() << "Not div by 4"; - } - while (iNumSamples > 0) { - CSAMPLE sample = *pSrc; - if (sample > fMax) { - sample = fMax; - clamped = true; - } else if (sample < fMin) { - sample = fMax; - clamped = true; - } - *pDest = sample; - pDest++; - pSrc++; - iNumSamples--; - } -#endif - return clamped; -} - // static void SampleUtil::interleaveBuffer(CSAMPLE* pDest, const CSAMPLE* pSrc1, const CSAMPLE* pSrc2, int iNumSamples) { - if (m_sOptimizationsOn) { - return sseInterleaveBuffer(pDest, pSrc1, pSrc2, iNumSamples); - } - for (int i = 0; i < iNumSamples; ++i) { pDest[2*i] = pSrc1[i]; pDest[2*i+1] = pSrc2[i]; } } -// static -void SampleUtil::sseInterleaveBuffer(CSAMPLE* pDest, - const CSAMPLE* pSrc1, const CSAMPLE* pSrc2, - int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pDest); - assert_aligned(pSrc1); - assert_aligned(pSrc2); - __m128 vSrc1Samples; - __m128 vSrc2Samples; - __m128 vLow; - __m128 vHigh; - while (iNumSamples >= 4) { - vSrc1Samples = _mm_loadu_ps(pSrc1); - vSrc2Samples = _mm_loadu_ps(pSrc2); - // vSrc1Samples is l1,l2,l3,l4 - // vSrc2Samples is r1,r2,r3,r4 - vLow = _mm_unpacklo_ps(vSrc1Samples, vSrc2Samples); - // vLow is l1,r1,l2,r2 - vHigh = _mm_unpackhi_ps(vSrc1Samples, vSrc2Samples); - // vHigh is l3,r3,l4,r4 - _mm_store_ps(pDest, vLow); - _mm_store_ps(pDest+4, vHigh); - iNumSamples -= 4; - pSrc1 += 4; - pSrc2 += 4; - pDest += 8; - } - while (iNumSamples > 0) { - *pDest++ = *pSrc1++; - *pDest++ = *pSrc2++; - iNumSamples--; - } -#endif -} - - // static void SampleUtil::deinterleaveBuffer(CSAMPLE* pDest1, CSAMPLE* pDest2, const CSAMPLE* pSrc, int iNumSamples) { - if (m_sOptimizationsOn) { - return sseDeinterleaveBuffer(pDest1, pDest2, pSrc, iNumSamples); - } - for (int i = 0; i < iNumSamples; ++i) { pDest1[i] = pSrc[i*2]; pDest2[i] = pSrc[i*2+1]; @@ -960,55 +269,17 @@ void SampleUtil::deinterleaveBuffer(CSAMPLE* pDest1, CSAMPLE* pDest2, } // static -void SampleUtil::sseDeinterleaveBuffer(CSAMPLE* pDest1, CSAMPLE* pDest2, - const CSAMPLE* pSrc, int iNumSamples) { -#ifdef __SSE__ - assert_aligned(pDest1); - assert_aligned(pDest2); - assert_aligned(pSrc); - __m128 vSrc1Samples; - __m128 vSrc2Samples; - __m128 vDst1Samples; - __m128 vDst2Samples; - while (iNumSamples >= 4) { - vSrc1Samples = _mm_loadu_ps(pSrc); - vSrc2Samples = _mm_loadu_ps(pSrc+4); - // vSrc1Samples is l1,r1,l2,r2 - // vSrc2Samples is l3,r3,l4,r4 - - // First shuffle the middle elements of both. - vSrc1Samples = _mm_shuffle_ps(vSrc1Samples, vSrc1Samples, - _MM_SHUFFLE(3, 1, 2, 0)); - //_MM_SHUFFLE(0, 2, 1, 3)); - vSrc2Samples = _mm_shuffle_ps(vSrc2Samples, vSrc2Samples, - _MM_SHUFFLE(3, 1, 2, 0)); - //_MM_SHUFFLE(0, 2, 1, 3)); - // vSrc1Samples is now l1,l2,r1,r2 - // vSrc2Samples is now l3,l4,r3,r4 - - // Now move the low half of src2 into the high of src1 to make dst1. To - // make dst2, move the high half of src1 into the low half of src2. - vDst1Samples = _mm_movelh_ps(vSrc1Samples, vSrc2Samples); - vDst2Samples = _mm_movehl_ps(vSrc2Samples, vSrc1Samples); - // vDst1Samples is now l1,l2,l3,l4 - // vDst2Samples is now r1,r2,r3,r4 - - _mm_store_ps(pDest1, vDst1Samples); - _mm_store_ps(pDest2, vDst2Samples); - iNumSamples -= 4; - pSrc += 8; - pDest1 += 4; - pDest2 += 4; - } - while (iNumSamples > 0) { - *pDest1++ = *pSrc++; - *pDest2++ = *pSrc++; - iNumSamples--; +void SampleUtil::linearCrossfadeBuffers(CSAMPLE* pDest, + const CSAMPLE* pSrcFadeOut, + const CSAMPLE* pSrcFadeIn, + int iNumSamples) { + double cross_mix = 0.0; + double cross_inc = 2.0 / static_cast(iNumSamples); + for (int i = 0; i + 1 < iNumSamples; i += 2) { + pDest[i] = pSrcFadeIn[i] * cross_mix + + pSrcFadeOut[i] * (1.0 - cross_mix); + pDest[i + 1] = pSrcFadeIn[i + 1] * cross_mix + + pSrcFadeOut[i + 1] * (1.0 - cross_mix); + cross_mix += cross_inc; } -#endif -} - -void SampleUtil::setOptimizations(bool opt) { - qDebug() << "Opts" << opt; - m_sOptimizationsOn = opt; } diff --git a/src/sampleutil.h b/src/sampleutil.h index 7a0bbec3bfc..6e1cdf0d27e 100644 --- a/src/sampleutil.h +++ b/src/sampleutil.h @@ -29,15 +29,13 @@ #define assert_aligned(data) (Q_ASSERT(reinterpret_cast(data) % 16 == 0)); -// A group of utilities for working with samples. Automatically use SSE/SSE2 -// optimizations where possible. +// A group of utilities for working with samples. class SampleUtil { public: static bool m_sOptimizationsOn; // Allocated a buffer of CSAMPLE's with length size. Ensures that the buffer - // is 16-byte aligned for use for use with SampleUtil SSE enhanced - // functions. + // is 16-byte aligned for SSE enhancement. static CSAMPLE* alloc(int size); // Frees a 16-byte aligned buffer allocated by SampleUtil::alloc() @@ -51,10 +49,20 @@ class SampleUtil { CSAMPLE gain1, CSAMPLE gain2, int iNumSamples); + // Multiply every sample in pBuffer ramping from gain1 to gain2. + // We use ramping as often as possible to prevent soundwave discontinuities + // which can cause audible clicks and pops. + static void applyRampingGain(CSAMPLE* pBuffer, CSAMPLE old_gain, CSAMPLE new_gain, int iNumSamples); + // Add each sample of pSrc, multiplied by the gain, to pDest static void addWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, CSAMPLE gain, int iNumSamples); + // Add each sample of pSrc, multiplied by the gain, to pDest + static void addWithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc, CSAMPLE old_gain, CSAMPLE new_gain, + int iNumSamples); + // Add to each sample of pDest, pSrc1 multiplied by gain1 plus pSrc2 // multiplied by gain2 static void add2WithGain(CSAMPLE* pDest, @@ -74,56 +82,9 @@ class SampleUtil { static void copyWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, CSAMPLE gain, int iNumSamples); - // Copies the sum of each channel, multiplied by its gain into pDest - static void copy2WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - int iNumSamples); - - // Copies the sum of each channel, multiplied by its gain into pDest - static void copy3WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - int iNumSamples); - - // Copies the sum of each channel, multiplied by its gain into pDest - static void copy4WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - const CSAMPLE* pSrc4, CSAMPLE gain4, - int iNumSamples); - - // Copies the sum of each channel, multiplied by its gain into pDest - static void copy5WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - const CSAMPLE* pSrc4, CSAMPLE gain4, - const CSAMPLE* pSrc5, CSAMPLE gain5, - int iNumSamples); - - // Copies the sum of each channel, multiplied by its gain into pDest - static void copy6WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - const CSAMPLE* pSrc4, CSAMPLE gain4, - const CSAMPLE* pSrc5, CSAMPLE gain5, - const CSAMPLE* pSrc6, CSAMPLE gain6, - int iNumSamples); - - // Copies the sum of each channel, multiplied by its gain into pDest - static void copy7WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - const CSAMPLE* pSrc4, CSAMPLE gain4, - const CSAMPLE* pSrc5, CSAMPLE gain5, - const CSAMPLE* pSrc6, CSAMPLE gain6, - const CSAMPLE* pSrc7, CSAMPLE gain7, - int iNumSamples); + // Copy pSrc to pDest and ramp gain + static void copyWithRampingGain(CSAMPLE* pDest, const CSAMPLE* pSrc, + CSAMPLE old_gain, CSAMPLE new_gain, int iNumSamples); // Convert a buffer of SAMPLEs to a buffer of CSAMPLEs. Does not work // in-place! pDest and pSrc must not be aliased. @@ -163,57 +124,18 @@ class SampleUtil { static void deinterleaveBuffer(CSAMPLE* pDest1, CSAMPLE* pDest2, const CSAMPLE* pSrc, int iNumSamples); - static void setOptimizations(bool opt); - - private: - static void sseApplyGain(CSAMPLE* pBuffer, - CSAMPLE gain, int iNumSamples) _ALIGN_STACK; - static void sseApplyAlternatingGain(CSAMPLE* pBuffer, - CSAMPLE gain1, CSAMPLE gain2, - int iNumSamples) _ALIGN_STACK; - static void sseAddWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, - CSAMPLE gain, int iNumSamples) _ALIGN_STACK; - static void sseAdd2WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - int iNumSamples) _ALIGN_STACK; - static void sseAdd3WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - int iNumSamples) _ALIGN_STACK; - - static void sseCopyWithGain(CSAMPLE* pDest, const CSAMPLE* pSrc, - CSAMPLE gain, int iNumSamples) _ALIGN_STACK; - static void sseCopy2WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - int iNumSamples) _ALIGN_STACK; - static void sseCopy3WithGain(CSAMPLE* pDest, - const CSAMPLE* pSrc1, CSAMPLE gain1, - const CSAMPLE* pSrc2, CSAMPLE gain2, - const CSAMPLE* pSrc3, CSAMPLE gain3, - int iNumSamples) _ALIGN_STACK; - static void sseConvert(CSAMPLE* pDest, - const SAMPLE* pSrc, int iNumSamples) _ALIGN_STACK; - static void sseSumAbsPerChannel(CSAMPLE* pfAbsL, CSAMPLE* pfAbsR, - const CSAMPLE* pBuffer, - int iNumSamples) _ALIGN_STACK; - static bool sseIsOutsideRange(CSAMPLE fMax, CSAMPLE fMin, - const CSAMPLE* pBuffer, - int iNumSamples) _ALIGN_STACK; - static bool sseCopyClampBuffer(CSAMPLE fMax, CSAMPLE fMin, - CSAMPLE* pDest, const CSAMPLE* pSrc, - int iNumSamples) _ALIGN_STACK; - static void sseInterleaveBuffer(CSAMPLE* pDest, - const CSAMPLE* pSrc1, const CSAMPLE* pSrc2, - int iNumSamples) _ALIGN_STACK; - static void sseDeinterleaveBuffer(CSAMPLE* pDest1, CSAMPLE* pDest2, - const CSAMPLE* pSrc, - int iNumSamples) _ALIGN_STACK; - - - + // Crossfade two buffers together and put the result in pDest. All the + // buffers must be the same length. pDest may be an alias of the source + // buffers. It is preferable to use the copyWithRamping functions, but + // sometimes this function is necessary. + static void linearCrossfadeBuffers(CSAMPLE* pDest, + const CSAMPLE* pSrcFadeOut, + const CSAMPLE* pSrcFadeIn, + int iNumSamples); + + // Include auto-generated methods (e.g. copyXWithGain, copyXWithRampingGain, + // etc.) + #include "sampleutil_autogen.h" }; diff --git a/src/sampleutil_autogen.h b/src/sampleutil_autogen.h new file mode 100644 index 00000000000..028578e79c7 --- /dev/null +++ b/src/sampleutil_autogen.h @@ -0,0 +1,8234 @@ +#ifndef SAMPLEUTILAUTOGEN_H +#define SAMPLEUTILAUTOGEN_H +//////////////////////////////////////////////////////// +// THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY! // +// SEE scripts/generate_sample_functions.py // +//////////////////////////////////////////////////////// +static inline void copy1WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + int iNumSamples) { + copyWithGain(pDest, pSrc0, gain0, iNumSamples); + return; +} +static inline void copy1WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + int iNumSamples) { + copyWithRampingGain(pDest, pSrc0, gain0in, gain0out, iNumSamples); + return; +} +static inline void copy2WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + int iNumSamples) { + if (gain0 == 0.0) { + copy1WithGain(pDest, pSrc1, gain1, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy1WithGain(pDest, pSrc0, gain0, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1; + } +} +static inline void copy2WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy1WithRampingGain(pDest, pSrc1, gain1in, gain1out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy1WithRampingGain(pDest, pSrc0, gain0in, gain0out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1; + } +} +static inline void copy3WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + int iNumSamples) { + if (gain0 == 0.0) { + copy2WithGain(pDest, pSrc1, gain1, pSrc2, gain2, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy2WithGain(pDest, pSrc0, gain0, pSrc2, gain2, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy2WithGain(pDest, pSrc0, gain0, pSrc1, gain1, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2; + } +} +static inline void copy3WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy2WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy2WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy2WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2; + } +} +static inline void copy4WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + int iNumSamples) { + if (gain0 == 0.0) { + copy3WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy3WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy3WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy3WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3; + } +} +static inline void copy4WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy3WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy3WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy3WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy3WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3; + } +} +static inline void copy5WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + int iNumSamples) { + if (gain0 == 0.0) { + copy4WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy4WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy4WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy4WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy4WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4; + } +} +static inline void copy5WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy4WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy4WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy4WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy4WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy4WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4; + } +} +static inline void copy6WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + int iNumSamples) { + if (gain0 == 0.0) { + copy5WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy5WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy5WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy5WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy5WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy5WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5; + } +} +static inline void copy6WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy5WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy5WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy5WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy5WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy5WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy5WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5; + } +} +static inline void copy7WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + int iNumSamples) { + if (gain0 == 0.0) { + copy6WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy6WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy6WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy6WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy6WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy6WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy6WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6; + } +} +static inline void copy7WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy6WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy6WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy6WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy6WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy6WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy6WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy6WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6; + } +} +static inline void copy8WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + int iNumSamples) { + if (gain0 == 0.0) { + copy7WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy7WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy7WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy7WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy7WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy7WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy7WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy7WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7; + } +} +static inline void copy8WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy7WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy7WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy7WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy7WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy7WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy7WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy7WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy7WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7; + } +} +static inline void copy9WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + int iNumSamples) { + if (gain0 == 0.0) { + copy8WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy8WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy8WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy8WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy8WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy8WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy8WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy8WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy8WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8; + } +} +static inline void copy9WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy8WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy8WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy8WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy8WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy8WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy8WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy8WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy8WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy8WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8; + } +} +static inline void copy10WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + int iNumSamples) { + if (gain0 == 0.0) { + copy9WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy9WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9; + } +} +static inline void copy10WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy9WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy9WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9; + } +} +static inline void copy11WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + int iNumSamples) { + if (gain0 == 0.0) { + copy10WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy10WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10; + } +} +static inline void copy11WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy10WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy10WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10; + } +} +static inline void copy12WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + int iNumSamples) { + if (gain0 == 0.0) { + copy11WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy11WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11; + } +} +static inline void copy12WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy11WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy11WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11; + } +} +static inline void copy13WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + int iNumSamples) { + if (gain0 == 0.0) { + copy12WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy12WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12; + } +} +static inline void copy13WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy12WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy12WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12; + } +} +static inline void copy14WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + int iNumSamples) { + if (gain0 == 0.0) { + copy13WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy13WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13; + } +} +static inline void copy14WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy13WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy13WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13; + } +} +static inline void copy15WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + int iNumSamples) { + if (gain0 == 0.0) { + copy14WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy14WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14; + } +} +static inline void copy15WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy14WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy14WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14; + } +} +static inline void copy16WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + int iNumSamples) { + if (gain0 == 0.0) { + copy15WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy15WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15; + } +} +static inline void copy16WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy15WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy15WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15; + } +} +static inline void copy17WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + int iNumSamples) { + if (gain0 == 0.0) { + copy16WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy16WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16; + } +} +static inline void copy17WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy16WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy16WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16; + } +} +static inline void copy18WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + int iNumSamples) { + if (gain0 == 0.0) { + copy17WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy17WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17; + } +} +static inline void copy18WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy17WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy17WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17; + } +} +static inline void copy19WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + int iNumSamples) { + if (gain0 == 0.0) { + copy18WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy18WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18; + } +} +static inline void copy19WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy18WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy18WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18; + } +} +static inline void copy20WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + int iNumSamples) { + if (gain0 == 0.0) { + copy19WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy19WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19; + } +} +static inline void copy20WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy19WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy19WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19; + } +} +static inline void copy21WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + int iNumSamples) { + if (gain0 == 0.0) { + copy20WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy20WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20; + } +} +static inline void copy21WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy20WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy20WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20; + } +} +static inline void copy22WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + int iNumSamples) { + if (gain0 == 0.0) { + copy21WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy21WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21; + } +} +static inline void copy22WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy21WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy21WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21; + } +} +static inline void copy23WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + int iNumSamples) { + if (gain0 == 0.0) { + copy22WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy22WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22; + } +} +static inline void copy23WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy22WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy22WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22; + } +} +static inline void copy24WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + int iNumSamples) { + if (gain0 == 0.0) { + copy23WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy23WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23; + } +} +static inline void copy24WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy23WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy23WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23; + } +} +static inline void copy25WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + const CSAMPLE* pSrc24, CSAMPLE gain24, + int iNumSamples) { + if (gain0 == 0.0) { + copy24WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc24, gain24, iNumSamples); + return; + } + if (gain24 == 0.0) { + copy24WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24; + } +} +static inline void copy25WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + const CSAMPLE* pSrc24, CSAMPLE gain24in, CSAMPLE gain24out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy24WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + if (gain24in == 0.0 && gain24out == 0.0) { + copy24WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + const CSAMPLE delta24 = 2.0 * (gain24out - gain24in) / iNumSamples; + CSAMPLE gain24 = gain24in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23, gain24 += delta24) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23 + + pSrc24[i + 1] * gain24; + } +} +static inline void copy26WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + const CSAMPLE* pSrc24, CSAMPLE gain24, + const CSAMPLE* pSrc25, CSAMPLE gain25, + int iNumSamples) { + if (gain0 == 0.0) { + copy25WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + if (gain24 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc25, gain25, iNumSamples); + return; + } + if (gain25 == 0.0) { + copy25WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25; + } +} +static inline void copy26WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + const CSAMPLE* pSrc24, CSAMPLE gain24in, CSAMPLE gain24out, + const CSAMPLE* pSrc25, CSAMPLE gain25in, CSAMPLE gain25out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy25WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain24in == 0.0 && gain24out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + if (gain25in == 0.0 && gain25out == 0.0) { + copy25WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + const CSAMPLE delta24 = 2.0 * (gain24out - gain24in) / iNumSamples; + CSAMPLE gain24 = gain24in; + const CSAMPLE delta25 = 2.0 * (gain25out - gain25in) / iNumSamples; + CSAMPLE gain25 = gain25in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23, gain24 += delta24, gain25 += delta25) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23 + + pSrc24[i + 1] * gain24 + + pSrc25[i + 1] * gain25; + } +} +static inline void copy27WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + const CSAMPLE* pSrc24, CSAMPLE gain24, + const CSAMPLE* pSrc25, CSAMPLE gain25, + const CSAMPLE* pSrc26, CSAMPLE gain26, + int iNumSamples) { + if (gain0 == 0.0) { + copy26WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain24 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + if (gain25 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc26, gain26, iNumSamples); + return; + } + if (gain26 == 0.0) { + copy26WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26; + } +} +static inline void copy27WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + const CSAMPLE* pSrc24, CSAMPLE gain24in, CSAMPLE gain24out, + const CSAMPLE* pSrc25, CSAMPLE gain25in, CSAMPLE gain25out, + const CSAMPLE* pSrc26, CSAMPLE gain26in, CSAMPLE gain26out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy26WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain24in == 0.0 && gain24out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain25in == 0.0 && gain25out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + if (gain26in == 0.0 && gain26out == 0.0) { + copy26WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + const CSAMPLE delta24 = 2.0 * (gain24out - gain24in) / iNumSamples; + CSAMPLE gain24 = gain24in; + const CSAMPLE delta25 = 2.0 * (gain25out - gain25in) / iNumSamples; + CSAMPLE gain25 = gain25in; + const CSAMPLE delta26 = 2.0 * (gain26out - gain26in) / iNumSamples; + CSAMPLE gain26 = gain26in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23, gain24 += delta24, gain25 += delta25, gain26 += delta26) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23 + + pSrc24[i + 1] * gain24 + + pSrc25[i + 1] * gain25 + + pSrc26[i + 1] * gain26; + } +} +static inline void copy28WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + const CSAMPLE* pSrc24, CSAMPLE gain24, + const CSAMPLE* pSrc25, CSAMPLE gain25, + const CSAMPLE* pSrc26, CSAMPLE gain26, + const CSAMPLE* pSrc27, CSAMPLE gain27, + int iNumSamples) { + if (gain0 == 0.0) { + copy27WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain24 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain25 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + if (gain26 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc27, gain27, iNumSamples); + return; + } + if (gain27 == 0.0) { + copy27WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27; + } +} +static inline void copy28WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + const CSAMPLE* pSrc24, CSAMPLE gain24in, CSAMPLE gain24out, + const CSAMPLE* pSrc25, CSAMPLE gain25in, CSAMPLE gain25out, + const CSAMPLE* pSrc26, CSAMPLE gain26in, CSAMPLE gain26out, + const CSAMPLE* pSrc27, CSAMPLE gain27in, CSAMPLE gain27out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy27WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain24in == 0.0 && gain24out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain25in == 0.0 && gain25out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain26in == 0.0 && gain26out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + if (gain27in == 0.0 && gain27out == 0.0) { + copy27WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + const CSAMPLE delta24 = 2.0 * (gain24out - gain24in) / iNumSamples; + CSAMPLE gain24 = gain24in; + const CSAMPLE delta25 = 2.0 * (gain25out - gain25in) / iNumSamples; + CSAMPLE gain25 = gain25in; + const CSAMPLE delta26 = 2.0 * (gain26out - gain26in) / iNumSamples; + CSAMPLE gain26 = gain26in; + const CSAMPLE delta27 = 2.0 * (gain27out - gain27in) / iNumSamples; + CSAMPLE gain27 = gain27in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23, gain24 += delta24, gain25 += delta25, gain26 += delta26, gain27 += delta27) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23 + + pSrc24[i + 1] * gain24 + + pSrc25[i + 1] * gain25 + + pSrc26[i + 1] * gain26 + + pSrc27[i + 1] * gain27; + } +} +static inline void copy29WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + const CSAMPLE* pSrc24, CSAMPLE gain24, + const CSAMPLE* pSrc25, CSAMPLE gain25, + const CSAMPLE* pSrc26, CSAMPLE gain26, + const CSAMPLE* pSrc27, CSAMPLE gain27, + const CSAMPLE* pSrc28, CSAMPLE gain28, + int iNumSamples) { + if (gain0 == 0.0) { + copy28WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain24 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain25 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain26 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + if (gain27 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc28, gain28, iNumSamples); + return; + } + if (gain28 == 0.0) { + copy28WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27 + + pSrc28[i] * gain28; + } +} +static inline void copy29WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + const CSAMPLE* pSrc24, CSAMPLE gain24in, CSAMPLE gain24out, + const CSAMPLE* pSrc25, CSAMPLE gain25in, CSAMPLE gain25out, + const CSAMPLE* pSrc26, CSAMPLE gain26in, CSAMPLE gain26out, + const CSAMPLE* pSrc27, CSAMPLE gain27in, CSAMPLE gain27out, + const CSAMPLE* pSrc28, CSAMPLE gain28in, CSAMPLE gain28out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy28WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain24in == 0.0 && gain24out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain25in == 0.0 && gain25out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain26in == 0.0 && gain26out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain27in == 0.0 && gain27out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + if (gain28in == 0.0 && gain28out == 0.0) { + copy28WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + const CSAMPLE delta24 = 2.0 * (gain24out - gain24in) / iNumSamples; + CSAMPLE gain24 = gain24in; + const CSAMPLE delta25 = 2.0 * (gain25out - gain25in) / iNumSamples; + CSAMPLE gain25 = gain25in; + const CSAMPLE delta26 = 2.0 * (gain26out - gain26in) / iNumSamples; + CSAMPLE gain26 = gain26in; + const CSAMPLE delta27 = 2.0 * (gain27out - gain27in) / iNumSamples; + CSAMPLE gain27 = gain27in; + const CSAMPLE delta28 = 2.0 * (gain28out - gain28in) / iNumSamples; + CSAMPLE gain28 = gain28in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23, gain24 += delta24, gain25 += delta25, gain26 += delta26, gain27 += delta27, gain28 += delta28) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27 + + pSrc28[i] * gain28; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23 + + pSrc24[i + 1] * gain24 + + pSrc25[i + 1] * gain25 + + pSrc26[i + 1] * gain26 + + pSrc27[i + 1] * gain27 + + pSrc28[i + 1] * gain28; + } +} +static inline void copy30WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + const CSAMPLE* pSrc24, CSAMPLE gain24, + const CSAMPLE* pSrc25, CSAMPLE gain25, + const CSAMPLE* pSrc26, CSAMPLE gain26, + const CSAMPLE* pSrc27, CSAMPLE gain27, + const CSAMPLE* pSrc28, CSAMPLE gain28, + const CSAMPLE* pSrc29, CSAMPLE gain29, + int iNumSamples) { + if (gain0 == 0.0) { + copy29WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain24 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain25 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain26 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain27 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + if (gain28 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc29, gain29, iNumSamples); + return; + } + if (gain29 == 0.0) { + copy29WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27 + + pSrc28[i] * gain28 + + pSrc29[i] * gain29; + } +} +static inline void copy30WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + const CSAMPLE* pSrc24, CSAMPLE gain24in, CSAMPLE gain24out, + const CSAMPLE* pSrc25, CSAMPLE gain25in, CSAMPLE gain25out, + const CSAMPLE* pSrc26, CSAMPLE gain26in, CSAMPLE gain26out, + const CSAMPLE* pSrc27, CSAMPLE gain27in, CSAMPLE gain27out, + const CSAMPLE* pSrc28, CSAMPLE gain28in, CSAMPLE gain28out, + const CSAMPLE* pSrc29, CSAMPLE gain29in, CSAMPLE gain29out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy29WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain24in == 0.0 && gain24out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain25in == 0.0 && gain25out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain26in == 0.0 && gain26out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain27in == 0.0 && gain27out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain28in == 0.0 && gain28out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + if (gain29in == 0.0 && gain29out == 0.0) { + copy29WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + const CSAMPLE delta24 = 2.0 * (gain24out - gain24in) / iNumSamples; + CSAMPLE gain24 = gain24in; + const CSAMPLE delta25 = 2.0 * (gain25out - gain25in) / iNumSamples; + CSAMPLE gain25 = gain25in; + const CSAMPLE delta26 = 2.0 * (gain26out - gain26in) / iNumSamples; + CSAMPLE gain26 = gain26in; + const CSAMPLE delta27 = 2.0 * (gain27out - gain27in) / iNumSamples; + CSAMPLE gain27 = gain27in; + const CSAMPLE delta28 = 2.0 * (gain28out - gain28in) / iNumSamples; + CSAMPLE gain28 = gain28in; + const CSAMPLE delta29 = 2.0 * (gain29out - gain29in) / iNumSamples; + CSAMPLE gain29 = gain29in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23, gain24 += delta24, gain25 += delta25, gain26 += delta26, gain27 += delta27, gain28 += delta28, gain29 += delta29) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27 + + pSrc28[i] * gain28 + + pSrc29[i] * gain29; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23 + + pSrc24[i + 1] * gain24 + + pSrc25[i + 1] * gain25 + + pSrc26[i + 1] * gain26 + + pSrc27[i + 1] * gain27 + + pSrc28[i + 1] * gain28 + + pSrc29[i + 1] * gain29; + } +} +static inline void copy31WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + const CSAMPLE* pSrc24, CSAMPLE gain24, + const CSAMPLE* pSrc25, CSAMPLE gain25, + const CSAMPLE* pSrc26, CSAMPLE gain26, + const CSAMPLE* pSrc27, CSAMPLE gain27, + const CSAMPLE* pSrc28, CSAMPLE gain28, + const CSAMPLE* pSrc29, CSAMPLE gain29, + const CSAMPLE* pSrc30, CSAMPLE gain30, + int iNumSamples) { + if (gain0 == 0.0) { + copy30WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain24 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain25 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain26 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain27 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain28 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + if (gain29 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc30, gain30, iNumSamples); + return; + } + if (gain30 == 0.0) { + copy30WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27 + + pSrc28[i] * gain28 + + pSrc29[i] * gain29 + + pSrc30[i] * gain30; + } +} +static inline void copy31WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + const CSAMPLE* pSrc24, CSAMPLE gain24in, CSAMPLE gain24out, + const CSAMPLE* pSrc25, CSAMPLE gain25in, CSAMPLE gain25out, + const CSAMPLE* pSrc26, CSAMPLE gain26in, CSAMPLE gain26out, + const CSAMPLE* pSrc27, CSAMPLE gain27in, CSAMPLE gain27out, + const CSAMPLE* pSrc28, CSAMPLE gain28in, CSAMPLE gain28out, + const CSAMPLE* pSrc29, CSAMPLE gain29in, CSAMPLE gain29out, + const CSAMPLE* pSrc30, CSAMPLE gain30in, CSAMPLE gain30out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy30WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain24in == 0.0 && gain24out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain25in == 0.0 && gain25out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain26in == 0.0 && gain26out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain27in == 0.0 && gain27out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain28in == 0.0 && gain28out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain29in == 0.0 && gain29out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + if (gain30in == 0.0 && gain30out == 0.0) { + copy30WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + const CSAMPLE delta24 = 2.0 * (gain24out - gain24in) / iNumSamples; + CSAMPLE gain24 = gain24in; + const CSAMPLE delta25 = 2.0 * (gain25out - gain25in) / iNumSamples; + CSAMPLE gain25 = gain25in; + const CSAMPLE delta26 = 2.0 * (gain26out - gain26in) / iNumSamples; + CSAMPLE gain26 = gain26in; + const CSAMPLE delta27 = 2.0 * (gain27out - gain27in) / iNumSamples; + CSAMPLE gain27 = gain27in; + const CSAMPLE delta28 = 2.0 * (gain28out - gain28in) / iNumSamples; + CSAMPLE gain28 = gain28in; + const CSAMPLE delta29 = 2.0 * (gain29out - gain29in) / iNumSamples; + CSAMPLE gain29 = gain29in; + const CSAMPLE delta30 = 2.0 * (gain30out - gain30in) / iNumSamples; + CSAMPLE gain30 = gain30in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23, gain24 += delta24, gain25 += delta25, gain26 += delta26, gain27 += delta27, gain28 += delta28, gain29 += delta29, gain30 += delta30) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27 + + pSrc28[i] * gain28 + + pSrc29[i] * gain29 + + pSrc30[i] * gain30; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23 + + pSrc24[i + 1] * gain24 + + pSrc25[i + 1] * gain25 + + pSrc26[i + 1] * gain26 + + pSrc27[i + 1] * gain27 + + pSrc28[i + 1] * gain28 + + pSrc29[i + 1] * gain29 + + pSrc30[i + 1] * gain30; + } +} +static inline void copy32WithGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0, + const CSAMPLE* pSrc1, CSAMPLE gain1, + const CSAMPLE* pSrc2, CSAMPLE gain2, + const CSAMPLE* pSrc3, CSAMPLE gain3, + const CSAMPLE* pSrc4, CSAMPLE gain4, + const CSAMPLE* pSrc5, CSAMPLE gain5, + const CSAMPLE* pSrc6, CSAMPLE gain6, + const CSAMPLE* pSrc7, CSAMPLE gain7, + const CSAMPLE* pSrc8, CSAMPLE gain8, + const CSAMPLE* pSrc9, CSAMPLE gain9, + const CSAMPLE* pSrc10, CSAMPLE gain10, + const CSAMPLE* pSrc11, CSAMPLE gain11, + const CSAMPLE* pSrc12, CSAMPLE gain12, + const CSAMPLE* pSrc13, CSAMPLE gain13, + const CSAMPLE* pSrc14, CSAMPLE gain14, + const CSAMPLE* pSrc15, CSAMPLE gain15, + const CSAMPLE* pSrc16, CSAMPLE gain16, + const CSAMPLE* pSrc17, CSAMPLE gain17, + const CSAMPLE* pSrc18, CSAMPLE gain18, + const CSAMPLE* pSrc19, CSAMPLE gain19, + const CSAMPLE* pSrc20, CSAMPLE gain20, + const CSAMPLE* pSrc21, CSAMPLE gain21, + const CSAMPLE* pSrc22, CSAMPLE gain22, + const CSAMPLE* pSrc23, CSAMPLE gain23, + const CSAMPLE* pSrc24, CSAMPLE gain24, + const CSAMPLE* pSrc25, CSAMPLE gain25, + const CSAMPLE* pSrc26, CSAMPLE gain26, + const CSAMPLE* pSrc27, CSAMPLE gain27, + const CSAMPLE* pSrc28, CSAMPLE gain28, + const CSAMPLE* pSrc29, CSAMPLE gain29, + const CSAMPLE* pSrc30, CSAMPLE gain30, + const CSAMPLE* pSrc31, CSAMPLE gain31, + int iNumSamples) { + if (gain0 == 0.0) { + copy31WithGain(pDest, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain1 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain2 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain3 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain4 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain5 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain6 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain7 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain8 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain9 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain10 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain11 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain12 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain13 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain14 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain15 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain16 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain17 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain18 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain19 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain20 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain21 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain22 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain23 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain24 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain25 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain26 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain27 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain28 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc29, gain29, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain29 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc30, gain30, pSrc31, gain31, iNumSamples); + return; + } + if (gain30 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc31, gain31, iNumSamples); + return; + } + if (gain31 == 0.0) { + copy31WithGain(pDest, pSrc0, gain0, pSrc1, gain1, pSrc2, gain2, pSrc3, gain3, pSrc4, gain4, pSrc5, gain5, pSrc6, gain6, pSrc7, gain7, pSrc8, gain8, pSrc9, gain9, pSrc10, gain10, pSrc11, gain11, pSrc12, gain12, pSrc13, gain13, pSrc14, gain14, pSrc15, gain15, pSrc16, gain16, pSrc17, gain17, pSrc18, gain18, pSrc19, gain19, pSrc20, gain20, pSrc21, gain21, pSrc22, gain22, pSrc23, gain23, pSrc24, gain24, pSrc25, gain25, pSrc26, gain26, pSrc27, gain27, pSrc28, gain28, pSrc29, gain29, pSrc30, gain30, iNumSamples); + return; + } + for (int i = 0; i < iNumSamples; ++i) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27 + + pSrc28[i] * gain28 + + pSrc29[i] * gain29 + + pSrc30[i] * gain30 + + pSrc31[i] * gain31; + } +} +static inline void copy32WithRampingGain(CSAMPLE* pDest, + const CSAMPLE* pSrc0, CSAMPLE gain0in, CSAMPLE gain0out, + const CSAMPLE* pSrc1, CSAMPLE gain1in, CSAMPLE gain1out, + const CSAMPLE* pSrc2, CSAMPLE gain2in, CSAMPLE gain2out, + const CSAMPLE* pSrc3, CSAMPLE gain3in, CSAMPLE gain3out, + const CSAMPLE* pSrc4, CSAMPLE gain4in, CSAMPLE gain4out, + const CSAMPLE* pSrc5, CSAMPLE gain5in, CSAMPLE gain5out, + const CSAMPLE* pSrc6, CSAMPLE gain6in, CSAMPLE gain6out, + const CSAMPLE* pSrc7, CSAMPLE gain7in, CSAMPLE gain7out, + const CSAMPLE* pSrc8, CSAMPLE gain8in, CSAMPLE gain8out, + const CSAMPLE* pSrc9, CSAMPLE gain9in, CSAMPLE gain9out, + const CSAMPLE* pSrc10, CSAMPLE gain10in, CSAMPLE gain10out, + const CSAMPLE* pSrc11, CSAMPLE gain11in, CSAMPLE gain11out, + const CSAMPLE* pSrc12, CSAMPLE gain12in, CSAMPLE gain12out, + const CSAMPLE* pSrc13, CSAMPLE gain13in, CSAMPLE gain13out, + const CSAMPLE* pSrc14, CSAMPLE gain14in, CSAMPLE gain14out, + const CSAMPLE* pSrc15, CSAMPLE gain15in, CSAMPLE gain15out, + const CSAMPLE* pSrc16, CSAMPLE gain16in, CSAMPLE gain16out, + const CSAMPLE* pSrc17, CSAMPLE gain17in, CSAMPLE gain17out, + const CSAMPLE* pSrc18, CSAMPLE gain18in, CSAMPLE gain18out, + const CSAMPLE* pSrc19, CSAMPLE gain19in, CSAMPLE gain19out, + const CSAMPLE* pSrc20, CSAMPLE gain20in, CSAMPLE gain20out, + const CSAMPLE* pSrc21, CSAMPLE gain21in, CSAMPLE gain21out, + const CSAMPLE* pSrc22, CSAMPLE gain22in, CSAMPLE gain22out, + const CSAMPLE* pSrc23, CSAMPLE gain23in, CSAMPLE gain23out, + const CSAMPLE* pSrc24, CSAMPLE gain24in, CSAMPLE gain24out, + const CSAMPLE* pSrc25, CSAMPLE gain25in, CSAMPLE gain25out, + const CSAMPLE* pSrc26, CSAMPLE gain26in, CSAMPLE gain26out, + const CSAMPLE* pSrc27, CSAMPLE gain27in, CSAMPLE gain27out, + const CSAMPLE* pSrc28, CSAMPLE gain28in, CSAMPLE gain28out, + const CSAMPLE* pSrc29, CSAMPLE gain29in, CSAMPLE gain29out, + const CSAMPLE* pSrc30, CSAMPLE gain30in, CSAMPLE gain30out, + const CSAMPLE* pSrc31, CSAMPLE gain31in, CSAMPLE gain31out, + int iNumSamples) { + if (gain0in == 0.0 && gain0out == 0.0) { + copy31WithRampingGain(pDest, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain1in == 0.0 && gain1out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain2in == 0.0 && gain2out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain3in == 0.0 && gain3out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain4in == 0.0 && gain4out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain5in == 0.0 && gain5out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain6in == 0.0 && gain6out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain7in == 0.0 && gain7out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain8in == 0.0 && gain8out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain9in == 0.0 && gain9out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain10in == 0.0 && gain10out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain11in == 0.0 && gain11out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain12in == 0.0 && gain12out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain13in == 0.0 && gain13out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain14in == 0.0 && gain14out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain15in == 0.0 && gain15out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain16in == 0.0 && gain16out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain17in == 0.0 && gain17out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain18in == 0.0 && gain18out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain19in == 0.0 && gain19out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain20in == 0.0 && gain20out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain21in == 0.0 && gain21out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain22in == 0.0 && gain22out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain23in == 0.0 && gain23out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain24in == 0.0 && gain24out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain25in == 0.0 && gain25out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain26in == 0.0 && gain26out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain27in == 0.0 && gain27out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain28in == 0.0 && gain28out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain29in == 0.0 && gain29out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc30, gain30in, gain30out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain30in == 0.0 && gain30out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc31, gain31in, gain31out, iNumSamples); + return; + } + if (gain31in == 0.0 && gain31out == 0.0) { + copy31WithRampingGain(pDest, pSrc0, gain0in, gain0out, pSrc1, gain1in, gain1out, pSrc2, gain2in, gain2out, pSrc3, gain3in, gain3out, pSrc4, gain4in, gain4out, pSrc5, gain5in, gain5out, pSrc6, gain6in, gain6out, pSrc7, gain7in, gain7out, pSrc8, gain8in, gain8out, pSrc9, gain9in, gain9out, pSrc10, gain10in, gain10out, pSrc11, gain11in, gain11out, pSrc12, gain12in, gain12out, pSrc13, gain13in, gain13out, pSrc14, gain14in, gain14out, pSrc15, gain15in, gain15out, pSrc16, gain16in, gain16out, pSrc17, gain17in, gain17out, pSrc18, gain18in, gain18out, pSrc19, gain19in, gain19out, pSrc20, gain20in, gain20out, pSrc21, gain21in, gain21out, pSrc22, gain22in, gain22out, pSrc23, gain23in, gain23out, pSrc24, gain24in, gain24out, pSrc25, gain25in, gain25out, pSrc26, gain26in, gain26out, pSrc27, gain27in, gain27out, pSrc28, gain28in, gain28out, pSrc29, gain29in, gain29out, pSrc30, gain30in, gain30out, iNumSamples); + return; + } + const CSAMPLE delta0 = 2.0 * (gain0out - gain0in) / iNumSamples; + CSAMPLE gain0 = gain0in; + const CSAMPLE delta1 = 2.0 * (gain1out - gain1in) / iNumSamples; + CSAMPLE gain1 = gain1in; + const CSAMPLE delta2 = 2.0 * (gain2out - gain2in) / iNumSamples; + CSAMPLE gain2 = gain2in; + const CSAMPLE delta3 = 2.0 * (gain3out - gain3in) / iNumSamples; + CSAMPLE gain3 = gain3in; + const CSAMPLE delta4 = 2.0 * (gain4out - gain4in) / iNumSamples; + CSAMPLE gain4 = gain4in; + const CSAMPLE delta5 = 2.0 * (gain5out - gain5in) / iNumSamples; + CSAMPLE gain5 = gain5in; + const CSAMPLE delta6 = 2.0 * (gain6out - gain6in) / iNumSamples; + CSAMPLE gain6 = gain6in; + const CSAMPLE delta7 = 2.0 * (gain7out - gain7in) / iNumSamples; + CSAMPLE gain7 = gain7in; + const CSAMPLE delta8 = 2.0 * (gain8out - gain8in) / iNumSamples; + CSAMPLE gain8 = gain8in; + const CSAMPLE delta9 = 2.0 * (gain9out - gain9in) / iNumSamples; + CSAMPLE gain9 = gain9in; + const CSAMPLE delta10 = 2.0 * (gain10out - gain10in) / iNumSamples; + CSAMPLE gain10 = gain10in; + const CSAMPLE delta11 = 2.0 * (gain11out - gain11in) / iNumSamples; + CSAMPLE gain11 = gain11in; + const CSAMPLE delta12 = 2.0 * (gain12out - gain12in) / iNumSamples; + CSAMPLE gain12 = gain12in; + const CSAMPLE delta13 = 2.0 * (gain13out - gain13in) / iNumSamples; + CSAMPLE gain13 = gain13in; + const CSAMPLE delta14 = 2.0 * (gain14out - gain14in) / iNumSamples; + CSAMPLE gain14 = gain14in; + const CSAMPLE delta15 = 2.0 * (gain15out - gain15in) / iNumSamples; + CSAMPLE gain15 = gain15in; + const CSAMPLE delta16 = 2.0 * (gain16out - gain16in) / iNumSamples; + CSAMPLE gain16 = gain16in; + const CSAMPLE delta17 = 2.0 * (gain17out - gain17in) / iNumSamples; + CSAMPLE gain17 = gain17in; + const CSAMPLE delta18 = 2.0 * (gain18out - gain18in) / iNumSamples; + CSAMPLE gain18 = gain18in; + const CSAMPLE delta19 = 2.0 * (gain19out - gain19in) / iNumSamples; + CSAMPLE gain19 = gain19in; + const CSAMPLE delta20 = 2.0 * (gain20out - gain20in) / iNumSamples; + CSAMPLE gain20 = gain20in; + const CSAMPLE delta21 = 2.0 * (gain21out - gain21in) / iNumSamples; + CSAMPLE gain21 = gain21in; + const CSAMPLE delta22 = 2.0 * (gain22out - gain22in) / iNumSamples; + CSAMPLE gain22 = gain22in; + const CSAMPLE delta23 = 2.0 * (gain23out - gain23in) / iNumSamples; + CSAMPLE gain23 = gain23in; + const CSAMPLE delta24 = 2.0 * (gain24out - gain24in) / iNumSamples; + CSAMPLE gain24 = gain24in; + const CSAMPLE delta25 = 2.0 * (gain25out - gain25in) / iNumSamples; + CSAMPLE gain25 = gain25in; + const CSAMPLE delta26 = 2.0 * (gain26out - gain26in) / iNumSamples; + CSAMPLE gain26 = gain26in; + const CSAMPLE delta27 = 2.0 * (gain27out - gain27in) / iNumSamples; + CSAMPLE gain27 = gain27in; + const CSAMPLE delta28 = 2.0 * (gain28out - gain28in) / iNumSamples; + CSAMPLE gain28 = gain28in; + const CSAMPLE delta29 = 2.0 * (gain29out - gain29in) / iNumSamples; + CSAMPLE gain29 = gain29in; + const CSAMPLE delta30 = 2.0 * (gain30out - gain30in) / iNumSamples; + CSAMPLE gain30 = gain30in; + const CSAMPLE delta31 = 2.0 * (gain31out - gain31in) / iNumSamples; + CSAMPLE gain31 = gain31in; + for (int i = 0; i < iNumSamples; i += 2, gain0 += delta0, gain1 += delta1, gain2 += delta2, gain3 += delta3, gain4 += delta4, gain5 += delta5, gain6 += delta6, gain7 += delta7, gain8 += delta8, gain9 += delta9, gain10 += delta10, gain11 += delta11, gain12 += delta12, gain13 += delta13, gain14 += delta14, gain15 += delta15, gain16 += delta16, gain17 += delta17, gain18 += delta18, gain19 += delta19, gain20 += delta20, gain21 += delta21, gain22 += delta22, gain23 += delta23, gain24 += delta24, gain25 += delta25, gain26 += delta26, gain27 += delta27, gain28 += delta28, gain29 += delta29, gain30 += delta30, gain31 += delta31) { + pDest[i] = pSrc0[i] * gain0 + + pSrc1[i] * gain1 + + pSrc2[i] * gain2 + + pSrc3[i] * gain3 + + pSrc4[i] * gain4 + + pSrc5[i] * gain5 + + pSrc6[i] * gain6 + + pSrc7[i] * gain7 + + pSrc8[i] * gain8 + + pSrc9[i] * gain9 + + pSrc10[i] * gain10 + + pSrc11[i] * gain11 + + pSrc12[i] * gain12 + + pSrc13[i] * gain13 + + pSrc14[i] * gain14 + + pSrc15[i] * gain15 + + pSrc16[i] * gain16 + + pSrc17[i] * gain17 + + pSrc18[i] * gain18 + + pSrc19[i] * gain19 + + pSrc20[i] * gain20 + + pSrc21[i] * gain21 + + pSrc22[i] * gain22 + + pSrc23[i] * gain23 + + pSrc24[i] * gain24 + + pSrc25[i] * gain25 + + pSrc26[i] * gain26 + + pSrc27[i] * gain27 + + pSrc28[i] * gain28 + + pSrc29[i] * gain29 + + pSrc30[i] * gain30 + + pSrc31[i] * gain31; + pDest[i + 1] = pSrc0[i + 1] * gain0 + + pSrc1[i + 1] * gain1 + + pSrc2[i + 1] * gain2 + + pSrc3[i + 1] * gain3 + + pSrc4[i + 1] * gain4 + + pSrc5[i + 1] * gain5 + + pSrc6[i + 1] * gain6 + + pSrc7[i + 1] * gain7 + + pSrc8[i + 1] * gain8 + + pSrc9[i + 1] * gain9 + + pSrc10[i + 1] * gain10 + + pSrc11[i + 1] * gain11 + + pSrc12[i + 1] * gain12 + + pSrc13[i + 1] * gain13 + + pSrc14[i + 1] * gain14 + + pSrc15[i + 1] * gain15 + + pSrc16[i + 1] * gain16 + + pSrc17[i + 1] * gain17 + + pSrc18[i + 1] * gain18 + + pSrc19[i + 1] * gain19 + + pSrc20[i + 1] * gain20 + + pSrc21[i + 1] * gain21 + + pSrc22[i + 1] * gain22 + + pSrc23[i + 1] * gain23 + + pSrc24[i + 1] * gain24 + + pSrc25[i + 1] * gain25 + + pSrc26[i + 1] * gain26 + + pSrc27[i + 1] * gain27 + + pSrc28[i + 1] * gain28 + + pSrc29[i + 1] * gain29 + + pSrc30[i + 1] * gain30 + + pSrc31[i + 1] * gain31; + } +} +#endif /* SAMPLEUTILAUTOGEN_H */