Don't bother returning the IR length for B-Format decoding
This commit is contained in:
parent
e5431bbef7
commit
88c0d22e7c
@ -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
|
/* 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
|
* 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);
|
max_length = RoundUp(max_length, MOD_IR_SIZE);
|
||||||
|
|
||||||
TRACE("Skipped min delay: %d, new combined length: %d\n", min_delay, max_length);
|
TRACE("Skipped min delay: %d, new combined length: %d\n", min_delay, max_length);
|
||||||
return max_length;
|
state->IrSize = max_length;
|
||||||
#undef NUM_BANDS
|
#undef NUM_BANDS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
* Produces HRTF filter coefficients for decoding B-Format, given a set of
|
||||||
* virtual speaker positions and HF/LF matrices for decoding to them. The
|
* virtual speaker positions and HF/LF matrices for decoding to them. The
|
||||||
* returned coefficients are ordered and scaled according to the matrices.
|
* 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 */
|
#endif /* ALC_HRTF_H */
|
||||||
|
@ -951,9 +951,8 @@ static void InitHrtfPanning(ALCdevice *device)
|
|||||||
|
|
||||||
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
||||||
|
|
||||||
device->Hrtf->IrSize = BuildBFormatHrtf(device->HrtfHandle,
|
BuildBFormatHrtf(device->HrtfHandle,
|
||||||
device->Hrtf, device->Dry.NumChannels,
|
device->Hrtf, device->Dry.NumChannels, AmbiPoints, AmbiMatrix, COUNTOF(AmbiPoints)
|
||||||
AmbiPoints, AmbiMatrix, COUNTOF(AmbiPoints)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user