mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
smoother: avoid losing precision
Avoid losing precision by subtracting uint64 values before converting them to doubles.
This commit is contained in:
parent
c36ab6896f
commit
2ee7cd15b3
1 changed files with 1 additions and 3 deletions
|
|
@ -320,10 +320,8 @@ static void estimate(pa_smoother *s, pa_usec_t x, pa_usec_t *y, double *deriv) {
|
|||
|
||||
calc_abc(s);
|
||||
|
||||
tx = (double) x;
|
||||
|
||||
/* Move to origin */
|
||||
tx -= (double) s->ex;
|
||||
tx = (double) (x - s->ex);
|
||||
|
||||
/* Horner scheme */
|
||||
ty = (tx * (s->c + tx * (s->b + tx * s->a)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue