diff options
author | Chris Robinson <[email protected]> | 2012-09-11 01:59:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-09-11 02:11:51 -0700 |
commit | 7e81918f7b76135928f7e40eff77493ea98596d5 (patch) | |
tree | 4c369af77374ac8022806b4495ada3b2d8971063 /Alc/mixer_c.c | |
parent | 1b840a3db80788813d44631357280520ee50e03f (diff) |
Update HRTF code
This update allows for much more flexibility in the HRTF data. It also allows
for HRTF table file names to include "%r" to represent the device's playback
rate (e.g. if you set hrtf-%r.mhr, then it will try to use hrtf-44100.mhr or
hrtf-48000.mhr depending if the device's output rate is 44100 or 48000,
respectively).
The makehrtf utility has also been updated to support more options and input
file formats, as well as the new mhr format.
Diffstat (limited to 'Alc/mixer_c.c')
-rw-r--r-- | Alc/mixer_c.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c index aecf03a5..fab13c0f 100644 --- a/Alc/mixer_c.c +++ b/Alc/mixer_c.c @@ -7,12 +7,13 @@ static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2], + const ALuint IrSize, ALfloat (*RESTRICT Coeffs)[2], ALfloat (*RESTRICT CoeffStep)[2], ALfloat left, ALfloat right) { ALuint c; - for(c = 0;c < HRIR_LENGTH;c++) + for(c = 0;c < IrSize;c++) { const ALuint off = (Offset+c)&HRIR_MASK; Values[off][0] += Coeffs[c][0] * left; @@ -23,11 +24,12 @@ static __inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*RESTRICT Values)[2 } static __inline void ApplyCoeffs(ALuint Offset, ALfloat (*RESTRICT Values)[2], + const ALuint IrSize, ALfloat (*RESTRICT Coeffs)[2], ALfloat left, ALfloat right) { ALuint c; - for(c = 0;c < HRIR_LENGTH;c++) + for(c = 0;c < IrSize;c++) { const ALuint off = (Offset+c)&HRIR_MASK; Values[off][0] += Coeffs[c][0] * left; |