From b6322325664ab91cb58d2c5c9b72fe3446458020 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 10 Oct 2019 02:28:29 +0200 Subject: [PATCH] Ref T730, fixed from "normalized value calculation" --- src/blackcore/afv/clients/afvclient.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blackcore/afv/clients/afvclient.cpp b/src/blackcore/afv/clients/afvclient.cpp index 0812feba1..4657be37e 100644 --- a/src/blackcore/afv/clients/afvclient.cpp +++ b/src/blackcore/afv/clients/afvclient.cpp @@ -507,8 +507,8 @@ namespace BlackCore int CAfvClient::getNormalizedOutputVolume() const { const double db = this->getOutputVolumeDb(); - const double range = MaxDbIn - MinDbIn; - const int i = qRound((db - MinDbIn) / range * 100); + const double range = MaxDbOut - MinDbOut; + const int i = qRound((db - MinDbOut) / range * 100); return i; } @@ -525,8 +525,8 @@ namespace BlackCore { if (volume < 0) { volume = 0; } else if (volume > 100) { volume = 100; } - const double range = MaxDbIn - MinDbIn; - const double dB = MinDbIn + (volume * range / 100.0); + const double range = MaxDbOut - MinDbOut; + const double dB = MinDbOut + (volume * range / 100.0); this->setOutputVolumeDb(dB); }