diff options
author | Chris Robinson <[email protected]> | 2016-02-09 21:42:24 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-02-09 21:42:24 -0800 |
commit | a9135ec39d8722502e92fc5141661c3479d877d9 (patch) | |
tree | e68ddda3d97dca362acb217efb89c606ca40cc79 | |
parent | 000ced37951795d4ded85b37a5337dbfdee90be1 (diff) |
Don't pass the channel count to GetBFormatHrtfCoeffs
Since it's hard-coded anyway, there's no need to specify it.
-rw-r--r-- | Alc/hrtf.c | 10 | ||||
-rw-r--r-- | Alc/hrtf.h | 2 | ||||
-rw-r--r-- | Alc/panning.c | 2 |
3 files changed, 6 insertions, 8 deletions
@@ -319,15 +319,13 @@ ALuint GetMovingHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat a * Note that these will decode a B-Format output mix, which uses FuMa ordering * and scaling, not N3D! */ -void GetBFormatHrtfCoeffs(const struct Hrtf *Hrtf, const ALuint num_chans, ALfloat (**coeffs_list)[2], ALuint **delay_list) +void GetBFormatHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat (*coeffs_list[4])[2], ALuint *delay_list[4]) { ALuint elev_idx, azi_idx; ALfloat scale; ALuint i, c; - assert(num_chans <= 4); - - for(c = 0;c < num_chans;c++) + for(c = 0;c < 4;c++) { ALfloat (*coeffs)[2] = coeffs_list[c]; ALuint *delay = delay_list[c]; @@ -377,7 +375,7 @@ void GetBFormatHrtfCoeffs(const struct Hrtf *Hrtf, const ALuint num_chans, ALflo ambi_coeffs[2] = y; ambi_coeffs[3] = z; - for(c = 0;c < num_chans;c++) + for(c = 0;c < 4;c++) { ALfloat (*coeffs)[2] = coeffs_list[c]; ALuint *delay = delay_list[c]; @@ -402,7 +400,7 @@ void GetBFormatHrtfCoeffs(const struct Hrtf *Hrtf, const ALuint num_chans, ALflo scale = 1.0f/scale; - for(c = 0;c < num_chans;c++) + for(c = 0;c < 4;c++) { ALfloat (*coeffs)[2] = coeffs_list[c]; ALuint *delay = delay_list[c]; @@ -35,6 +35,6 @@ ALuint GetHrtfIrSize(const struct Hrtf *Hrtf); void GetLerpedHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat dirfact, ALfloat gain, ALfloat (*coeffs)[2], ALuint *delays); ALuint GetMovingHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat dirfact, ALfloat gain, ALfloat delta, ALint counter, ALfloat (*coeffs)[2], ALuint *delays, ALfloat (*coeffStep)[2], ALint *delayStep); -void GetBFormatHrtfCoeffs(const struct Hrtf *Hrtf, const ALuint num_chans, ALfloat (**coeffs_list)[2], ALuint **delay_list); +void GetBFormatHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat (*coeffs_list[4])[2], ALuint *delay_list[4]); #endif /* ALC_HRTF_H */ diff --git a/Alc/panning.c b/Alc/panning.c index 8464efd6..5013ec16 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -505,7 +505,7 @@ ALvoid aluInitPanning(ALCdevice *device) coeffs_list[i] = device->Hrtf_Params[chan].Coeffs; delay_list[i] = device->Hrtf_Params[chan].Delay; } - GetBFormatHrtfCoeffs(device->Hrtf, 4, coeffs_list, delay_list); + GetBFormatHrtfCoeffs(device->Hrtf, coeffs_list, delay_list); return; } |