summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-09-25 17:04:54 +0200
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-09-25 17:12:30 +0200
commit37fed29fecfd5f938fd49d022ece82bbe406deb2 (patch)
tree5735e0c3f8e2c33f57f2ff7a0925e8b253df4edf /src/engine
parent1c0993faf29cc820ab0e0cac21df214a00bf02c4 (diff)
engine/enginemaster: Add explicit typecasts
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/enginemaster.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/enginemaster.cpp b/src/engine/enginemaster.cpp
index b38914eaea..e376adff73 100644
--- a/src/engine/enginemaster.cpp
+++ b/src/engine/enginemaster.cpp
@@ -412,9 +412,9 @@ void EngineMaster::process(const int iBufferSize) {
CSAMPLE pflMixGainInHeadphones = 1;
CSAMPLE masterMixGainInHeadphones = 0;
if (masterEnabled) {
- CSAMPLE cf_val = m_pHeadMix->get();
- pflMixGainInHeadphones = 0.5 * (-cf_val + 1.);
- masterMixGainInHeadphones = 0.5 * (cf_val + 1.);
+ const auto cf_val = static_cast<CSAMPLE>(m_pHeadMix->get());
+ pflMixGainInHeadphones = 0.5f * (-cf_val + 1.0f);
+ masterMixGainInHeadphones = 0.5f * (cf_val + 1.0f);
// qDebug() << "head val " << cf_val << ", head " << chead_gain
// << ", master " << cmaster_gain;
}
@@ -710,7 +710,7 @@ void EngineMaster::process(const int iBufferSize) {
// Balance values
CSAMPLE balright = 1.;
CSAMPLE balleft = 1.;
- CSAMPLE bal = m_pBalance->get();
+ const auto bal = static_cast<CSAMPLE>(m_pBalance->get());
if (bal > 0.) {
balleft -= bal;
} else if (bal < 0.) {