mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 04:55:41 +01:00
More fixes..
This commit is contained in:
parent
724603ae07
commit
ac7440d124
1 changed files with 9 additions and 7 deletions
|
@ -184,6 +184,7 @@ static int convert_prange(int val, int min, int max)
|
||||||
|
|
||||||
if (range == 0)
|
if (range == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
val -= min;
|
||||||
tmp = rint((double)val/(double)range * 100);
|
tmp = rint((double)val/(double)range * 100);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
@ -196,9 +197,10 @@ static int convert_prange1(int val, int min, int max)
|
||||||
int tmp;
|
int tmp;
|
||||||
|
|
||||||
if (range == 0)
|
if (range == 0)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
tmp = rint((double)range * ((double)val*.01));
|
tmp = rint((double)range * ((double)val*.01));
|
||||||
|
tmp += min;
|
||||||
#if 0
|
#if 0
|
||||||
printf("%i %i %i %i", val, max, min, tmp);
|
printf("%i %i %i %i", val, max, min, tmp);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue