aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-02-09 21:42:24 -0800
committerChris Robinson <[email protected]>2016-02-09 21:42:24 -0800
commita9135ec39d8722502e92fc5141661c3479d877d9 (patch)
treee68ddda3d97dca362acb217efb89c606ca40cc79
parent000ced37951795d4ded85b37a5337dbfdee90be1 (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.c10
-rw-r--r--Alc/hrtf.h2
-rw-r--r--Alc/panning.c2
3 files changed, 6 insertions, 8 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 467232d7..43a111bb 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -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];
diff --git a/Alc/hrtf.h b/Alc/hrtf.h
index 6dcd6948..9f3f0ade 100644
--- a/Alc/hrtf.h
+++ b/Alc/hrtf.h
@@ -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;
}