mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 00:45:46 +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
|
int CAfvClient::getNormalizedOutputVolume() const
|
||||||
{
|
{
|
||||||
const double db = this->getOutputVolumeDb();
|
const double db = this->getOutputVolumeDb();
|
||||||
const double range = MaxDbIn - MinDbIn;
|
const double range = MaxDbOut - MinDbOut;
|
||||||
const int i = qRound((db - MinDbIn) / range * 100);
|
const int i = qRound((db - MinDbOut) / range * 100);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -525,8 +525,8 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
if (volume < 0) { volume = 0; }
|
if (volume < 0) { volume = 0; }
|
||||||
else if (volume > 100) { volume = 100; }
|
else if (volume > 100) { volume = 100; }
|
||||||
const double range = MaxDbIn - MinDbIn;
|
const double range = MaxDbOut - MinDbOut;
|
||||||
const double dB = MinDbIn + (volume * range / 100.0);
|
const double dB = MinDbOut + (volume * range / 100.0);
|
||||||
this->setOutputVolumeDb(dB);
|
this->setOutputVolumeDb(dB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user