Ryan C. Gordon e2ec1eb12e audio: converting int32 to/from float shouldn't use doubles.
The concern is that a massive int sample, like 0x7FFFFFFF, won't fit in a
float32, which doesn't have enough bits to hold a whole number this large,
just to divide it to get a value between 0 and 1.
Previously we would convert to double, to get more bits, do the division, and
cast back to a float, but this is expensive.

Casting to double is more accurate, but it's 2x to 3x slower. Shifting out
the least significant byte of an int32, so it'll definitely fit in a float,
and dividing by 0x7FFFFF is still accurate to about 5 decimal places, and the
difference doesn't appear to be perceptable.
2018-05-15 01:04:11 -04:00
..
2018-01-03 10:03:25 -08:00
2018-05-21 11:35:42 -04:00
2018-05-21 11:35:42 -04:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-30 16:53:24 -08:00
2018-01-03 10:03:25 -08:00
2018-04-23 22:17:56 -07:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00