fix(build): pow10 not defined on Fedora Rawhide (#807)

pow10 is a GNU extension and not available everywhere
This commit is contained in:
Pier 2017-10-15 18:16:07 +01:00 committed by Patrick Ziegler
parent caeb8ddae4
commit cbd87efc64
1 changed files with 3 additions and 3 deletions

View File

@ -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;
} }