Don't pass the channel count to GetBFormatHrtfCoeffs

Since it's hard-coded anyway, there's no need to specify it.
This commit is contained in:
Chris Robinson
2016-02-09 21:42:24 -08:00
parent 000ced3795
commit a9135ec39d
3 changed files with 6 additions and 8 deletions
+4 -6
View File
@@ -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];
+1 -1
View File
@@ -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 */
+1 -1
View File
@@ -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;
}