mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
Ref T730, CPP check issues fixed
This commit is contained in:
committed by
Mat Sutcliffe
parent
1d9cd50463
commit
30baa12a86
@@ -156,14 +156,11 @@ namespace BlackCore
|
||||
samples = convertFromStereoToMono(samples);
|
||||
}
|
||||
|
||||
int value = 0;
|
||||
for (qint16 &sample : samples)
|
||||
{
|
||||
value = qRound(sample * m_volume);
|
||||
if (value > std::numeric_limits<qint16>::max())
|
||||
value = std::numeric_limits<qint16>::max();
|
||||
if (value < std::numeric_limits<qint16>::min())
|
||||
value = std::numeric_limits<qint16>::min();
|
||||
int value = qRound(sample * m_volume);
|
||||
if (value > std::numeric_limits<qint16>::max()) value = std::numeric_limits<qint16>::max();
|
||||
if (value < std::numeric_limits<qint16>::min()) value = std::numeric_limits<qint16>::min();
|
||||
sample = static_cast<qint16>(value);
|
||||
|
||||
qint16 sampleInput = qAbs(sample);
|
||||
|
||||
Reference in New Issue
Block a user