mirror of
https://github.com/polybar/polybar.git
synced 2024-11-11 13:50:56 -05:00
fix(build): pow10 not defined on Fedora Rawhide (#807)
pow10 is a GNU extension and not available everywhere
This commit is contained in:
parent
caeb8ddae4
commit
cbd87efc64
1 changed files with 3 additions and 3 deletions
|
@ -136,9 +136,9 @@ namespace alsa {
|
||||||
return math_util::percentage(vol_total / chan_n, vol_min, vol_max);
|
return math_util::percentage(vol_total / chan_n, vol_min, vol_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
normalized = pow10((vol_total / chan_n - vol_max) / 6000.0);
|
normalized = pow(10, (vol_total / chan_n - vol_max) / 6000.0);
|
||||||
if (vol_min != SND_CTL_TLV_DB_GAIN_MUTE) {
|
if (vol_min != SND_CTL_TLV_DB_GAIN_MUTE) {
|
||||||
min_norm = pow10((vol_min - vol_max) / 6000.0);
|
min_norm = pow(10, (vol_min - vol_max) / 6000.0);
|
||||||
normalized = (normalized - min_norm) / (1 - min_norm);
|
normalized = (normalized - min_norm) / (1 - min_norm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ namespace alsa {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vol_min != SND_CTL_TLV_DB_GAIN_MUTE) {
|
if (vol_min != SND_CTL_TLV_DB_GAIN_MUTE) {
|
||||||
min_norm = pow10((vol_min - vol_max) / 6000.0);
|
min_norm = pow(10, (vol_min - vol_max) / 6000.0);
|
||||||
percentage = percentage * (1 - min_norm) + min_norm;
|
percentage = percentage * (1 - min_norm) + min_norm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue