summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-09-25 02:15:55 +0200
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-09-25 02:15:55 +0200
commit61f8d807a460ea7dc965900f38e6e262d573aa9e (patch)
tree8bade71a0ca12f6d9a877866b00b773140575041 /src/engine
parentb33aa5ab2c06e4b246ce8297f6d1f528d19c7f3a (diff)
engine/filters/enginefiltermoogladder4: Avoid unnecessary double casts
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/filters/enginefiltermoogladder4.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/filters/enginefiltermoogladder4.h b/src/engine/filters/enginefiltermoogladder4.h
index f1e6fd504b..e7f87d3880 100644
--- a/src/engine/filters/enginefiltermoogladder4.h
+++ b/src/engine/filters/enginefiltermoogladder4.h
@@ -163,14 +163,14 @@ class EngineFilterMoogLadderBase : public EngineObjectConstIn {
// of the new filter but it turns out that this produces
// a gain drop due to the filter delay which is more
// conspicuous than the settling noise.
- double old1 = pIn[i];
- double old2 = pIn[i + 1];
+ CSAMPLE old1 = pIn[i];
+ CSAMPLE old2 = pIn[i + 1];
double new1 = processSample(pIn[i], &m_buf[0]);
double new2 = processSample(pIn[i+1], &m_buf[1]);
if (i < iBufferSize / 2) {
- pOutput[i] = static_cast<CSAMPLE>(old1);
- pOutput[i + 1] = static_cast<CSAMPLE>(old2);
+ pOutput[i] = old1;
+ pOutput[i + 1] = old2;
} else {
pOutput[i] = static_cast<CSAMPLE>(new1 * cross_mix + old1 * (1.0 - cross_mix));
pOutput[i + 1] = static_cast<CSAMPLE>(