Ref T730, fixed from "normalized value calculation"

This commit is contained in:
Klaus Basan
2019-10-10 02:28:29 +02:00
committed by Mat Sutcliffe
parent 966b261c0d
commit b632232566

View File

@@ -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);
}