aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/hrtf.c4
-rw-r--r--Alc/hrtf.h3
-rw-r--r--Alc/panning.c5
3 files changed, 5 insertions, 7 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index d9968154..56a4c670 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -181,7 +181,7 @@ void GetHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth,
}
-ALsizei BuildBFormatHrtf(const struct Hrtf *Hrtf, DirectHrtfState *state, ALsizei NumChannels, const ALfloat (*restrict AmbiPoints)[2], const ALfloat (*restrict AmbiMatrix)[2][MAX_AMBI_COEFFS], ALsizei AmbiCount)
+void BuildBFormatHrtf(const struct Hrtf *Hrtf, DirectHrtfState *state, ALsizei NumChannels, const ALfloat (*restrict AmbiPoints)[2], const ALfloat (*restrict AmbiMatrix)[2][MAX_AMBI_COEFFS], ALsizei AmbiCount)
{
/* Set this to 2 for dual-band HRTF processing. May require a higher quality
* band-splitter, or better calculation of the new IR length to deal with the
@@ -288,7 +288,7 @@ ALsizei BuildBFormatHrtf(const struct Hrtf *Hrtf, DirectHrtfState *state, ALsize
max_length = RoundUp(max_length, MOD_IR_SIZE);
TRACE("Skipped min delay: %d, new combined length: %d\n", min_delay, max_length);
- return max_length;
+ state->IrSize = max_length;
#undef NUM_BANDS
}
diff --git a/Alc/hrtf.h b/Alc/hrtf.h
index 5de28f90..0c47ded9 100644
--- a/Alc/hrtf.h
+++ b/Alc/hrtf.h
@@ -45,8 +45,7 @@ void GetHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth,
* Produces HRTF filter coefficients for decoding B-Format, given a set of
* virtual speaker positions and HF/LF matrices for decoding to them. The
* returned coefficients are ordered and scaled according to the matrices.
- * Returns the maximum impulse-response length of the generated coefficients.
*/
-ALsizei BuildBFormatHrtf(const struct Hrtf *Hrtf, DirectHrtfState *state, ALsizei NumChannels, const ALfloat (*restrict AmbiPoints)[2], const ALfloat (*restrict AmbiMatrix)[2][MAX_AMBI_COEFFS], ALsizei AmbiCount);
+void BuildBFormatHrtf(const struct Hrtf *Hrtf, DirectHrtfState *state, ALsizei NumChannels, const ALfloat (*restrict AmbiPoints)[2], const ALfloat (*restrict AmbiMatrix)[2][MAX_AMBI_COEFFS], ALsizei AmbiCount);
#endif /* ALC_HRTF_H */
diff --git a/Alc/panning.c b/Alc/panning.c
index d44b7e18..d1cb6df4 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -951,9 +951,8 @@ static void InitHrtfPanning(ALCdevice *device)
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
- device->Hrtf->IrSize = BuildBFormatHrtf(device->HrtfHandle,
- device->Hrtf, device->Dry.NumChannels,
- AmbiPoints, AmbiMatrix, COUNTOF(AmbiPoints)
+ BuildBFormatHrtf(device->HrtfHandle,
+ device->Hrtf, device->Dry.NumChannels, AmbiPoints, AmbiMatrix, COUNTOF(AmbiPoints)
);
}