diff options
author | Chris Robinson <[email protected]> | 2017-01-16 07:45:07 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-01-16 08:06:25 -0800 |
commit | cbb796bf31cd3acfba0ce35e71a51d03e7e26021 (patch) | |
tree | 0264bcb03f58e8dee89ee383d61da0bf4e7469d1 /Alc/mixer.c | |
parent | 9f23d17333c8faaa0a2b7a86df33c41874a929a5 (diff) |
Use ALsizei for sizes and offsets with the mixer
Unsigned 32-bit offsets actually have some potential overhead on 64-bit targets
for pointer/array accesses due to rules on integer wrapping. No idea how much
impact it has in practice, but it's nice to be correct about it.
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r-- | Alc/mixer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index be6a137c..cfb975f4 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -589,7 +589,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam { ALfloat delta = 1.0f / (ALfloat)Counter; ALfloat coeffdiff; - ALint delaydiff; + ALsizei delaydiff; for(j = 0;j < IrSize;j++) { coeffdiff = parms->Hrtf.Target.Coeffs[j][0] - parms->Hrtf.Current.Coeffs[j][0]; @@ -597,9 +597,9 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam coeffdiff = parms->Hrtf.Target.Coeffs[j][1] - parms->Hrtf.Current.Coeffs[j][1]; hrtfparams.Steps.Coeffs[j][1] = coeffdiff * delta; } - delaydiff = (ALint)(parms->Hrtf.Target.Delay[0] - parms->Hrtf.Current.Delay[0]); + delaydiff = parms->Hrtf.Target.Delay[0] - parms->Hrtf.Current.Delay[0]; hrtfparams.Steps.Delay[0] = fastf2i((ALfloat)delaydiff * delta); - delaydiff = (ALint)(parms->Hrtf.Target.Delay[1] - parms->Hrtf.Current.Delay[1]); + delaydiff = parms->Hrtf.Target.Delay[1] - parms->Hrtf.Current.Delay[1]; hrtfparams.Steps.Delay[1] = fastf2i((ALfloat)delaydiff * delta); } hrtfparams.Target = &parms->Hrtf.Target; |