[Audio] Get/set audio device volume (this is the device's value, NOT the logical AFV value)

This commit is contained in:
Klaus Basan
2019-12-06 23:51:58 +01:00
committed by Mat Sutcliffe
parent fc9bb1277d
commit 091fa5f338
8 changed files with 98 additions and 11 deletions

View File

@@ -233,4 +233,16 @@ namespace BlackSound
static const QString unknown("unknown");
return unknown;
}
double normalize0to100(double in)
{
if (in < 0) { return 0; }
return (in >= 1.0) ? 1.0 : in;
}
qreal normalize0to100qr(double in)
{
return static_cast<qreal>(normalize0to100(in));
}
} // ns