private:
- void accumulate_ch(std::vector<double>& ch_accumulator, std::vector<double> const& input_channel, int nsamples) const
- {
- for (auto i = 0; i < nsamples; i++) {
- ch_accumulator[i] += input_channel[i];
- }
- }
-
std::vector<double> rectify(std::vector<double> const& input) const
{
std::vector<double> squared;
void process()
{
+ auto accumulate_ch = [](std::vector<double>& ch_accumulator, std::vector<double> const& input_channel, int nsamples) {
+ for (auto i = 0; i < nsamples; i++) {
+ ch_accumulator[i] += input_channel[i];
+ }
+ };
+
/* Round-up in case _nsamples is not a multiple of _nch */
int const frames = (_nsamples + _nch - 1) / _nch;