mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T730, fixed from "normalized value calculation"
This commit is contained in:
committed by
Mat Sutcliffe
parent
966b261c0d
commit
b632232566
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user