summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-19 21:08:54 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-20 00:31:10 +0200
commit9192e363b058ab5cf7672609521489113f0e3667 (patch)
tree2ac1242a85daafec69dffae9d5b5f20ce0f574c3 /src
parent573492f399593989a8888eceb9d4ee3ba3700a59 (diff)
Inline some method calls.
Diffstat (limited to 'src')
-rw-r--r--src/leqm-nrt.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/leqm-nrt.cc b/src/leqm-nrt.cc
index b3ccb25..83533e6 100644
--- a/src/leqm-nrt.cc
+++ b/src/leqm-nrt.cc
@@ -180,8 +180,6 @@ private:
{
int const frames = _nsamples / _nch;
- std::vector<double> sum_and_square_buffer(frames);
- std::vector<double> c_sum_and_square_buffer(frames);
std::vector<double> ch_sum_accumulator_norm(frames);
std::vector<double> ch_sum_accumulator_conv(frames);
@@ -195,15 +193,9 @@ private:
normalized_buffer[m] = _buffer[n] * _chconf[ch]; //this scale amplitude according to specified calibration
}
- //convolution
auto convolved_buffer = convolve(normalized_buffer, _ir);
- //rectify, square und sum
- c_sum_and_square_buffer = rectify(convolved_buffer);
- sum_and_square_buffer = rectify(normalized_buffer);
-
- accumulate_ch(ch_sum_accumulator_norm, sum_and_square_buffer, frames);
- accumulate_ch(ch_sum_accumulator_conv, c_sum_and_square_buffer, frames);
-
+ accumulate_ch(ch_sum_accumulator_norm, rectify(normalized_buffer), frames);
+ accumulate_ch(ch_sum_accumulator_conv, rectify(convolved_buffer), frames);
}
_sum->sum_samples(ch_sum_accumulator_norm, ch_sum_accumulator_conv, frames);