mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
user lrint() and friends in inner loops instead of normal C casts to speed up a few things
This commit is contained in:
parent
1bb5e58fb3
commit
33b186e74d
5 changed files with 13 additions and 13 deletions
|
|
@ -96,7 +96,7 @@ pa_volume_t pa_sw_volume_from_dB(double dB) {
|
|||
if (isinf(dB) < 0 || dB <= -USER_DECIBEL_RANGE)
|
||||
return PA_VOLUME_MUTED;
|
||||
|
||||
return (pa_volume_t) ((dB/USER_DECIBEL_RANGE+1)*PA_VOLUME_NORM);
|
||||
return (pa_volume_t) lrint((dB/USER_DECIBEL_RANGE+1)*PA_VOLUME_NORM);
|
||||
}
|
||||
|
||||
double pa_sw_volume_to_dB(pa_volume_t v) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue