SDL/src/audio
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
..
alsa Updated copyright for 2018 2018-01-03 10:03:25 -08:00
android Updated copyright for 2018 2018-01-03 10:03:25 -08:00
arts Updated copyright for 2018 2018-01-03 10:03:25 -08:00
coreaudio coreaudio: Use the standard SDL audio thread instead of spinning a new one. 2018-04-16 02:11:09 -04:00
directsound revert the recent typecast assignment changes (see bug #4079) 2018-02-12 17:00:00 +03:00
disk Updated copyright for 2018 2018-01-03 10:03:25 -08:00
dsp Updated copyright for 2018 2018-01-03 10:03:25 -08:00
dummy Updated copyright for 2018 2018-01-03 10:03:25 -08:00
emscripten Updated copyright for 2018 2018-01-03 10:03:25 -08:00
esd Updated copyright for 2018 2018-01-03 10:03:25 -08:00
fusionsound Updated copyright for 2018 2018-01-03 10:03:25 -08:00
haiku Updated copyright for 2018 2018-01-03 10:03:25 -08:00
jack Updated copyright for 2018 2018-01-03 10:03:25 -08:00
nacl Updated copyright for 2018 2018-01-03 10:03:25 -08:00
nas Updated copyright for 2018 2018-01-03 10:03:25 -08:00
netbsd Updated copyright for 2018 2018-01-03 10:03:25 -08:00
paudio Updated copyright for 2018 2018-01-03 10:03:25 -08:00
psp Updated copyright for 2018 2018-01-03 10:03:25 -08:00
pulseaudio pulseaudio: Just read/dump captured data in FlushCapture. 2018-02-17 18:30:21 -05:00
qsa Updated copyright for 2018 2018-01-03 10:03:25 -08:00
sndio Updated copyright for 2018 2018-01-03 10:03:25 -08:00
sun Updated copyright for 2018 2018-01-03 10:03:25 -08:00
wasapi Fixed MinGW-w64 build 2018-02-24 08:23:44 -08:00
winmm Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audio_c.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audio.c Added SDL_THREAD_PRIORITY_TIME_CRITICAL 2018-04-23 22:07:56 -07:00
SDL_audiocvt.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audiodev_c.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audiodev.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audiotypecvt.c audio: converting int32 to/from float shouldn't use doubles. 2018-05-15 01:04:11 -04:00
SDL_mixer.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_sysaudio.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_wave.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_wave.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00