diff options
author | Chris Robinson <[email protected]> | 2018-05-12 00:52:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-05-12 00:52:09 -0700 |
commit | e787a241c0e96b890f2173ec71aa02b5b9411ec6 (patch) | |
tree | 23c8965efe5599829eb13964ca1a6da0b48fea54 /Alc/ALu.c | |
parent | 3867cad94de7e1ddc1538e25d77e30381bf4bb40 (diff) |
Add and use a method for fast float rounding
Unlike fastf2i, this keeps the result as a float instead of converting to
integer.
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1663,7 +1663,7 @@ static void ApplyDither(ALfloat (*restrict Samples)[BUFFERSIZE], ALuint *dither_ ALuint rng0 = dither_rng(&seed); ALuint rng1 = dither_rng(&seed); val += (ALfloat)(rng0*(1.0/UINT_MAX) - rng1*(1.0/UINT_MAX)); - samples[i] = fastf2i(val) * invscale; + samples[i] = fast_roundf(val) * invscale; } } *dither_seed = seed; |