Use size_t for HrtfMixer functions' buffer size
This commit is contained in:
parent
a19f65f2c8
commit
3fa83547e9
@ -159,6 +159,7 @@ void ALCdevice::ProcessHrtf(const ALsizei SamplesToDo)
|
|||||||
const int ridx{RealOut.ChannelIndex[FrontRight]};
|
const int ridx{RealOut.ChannelIndex[FrontRight]};
|
||||||
ASSUME(lidx >= 0 && ridx >= 0);
|
ASSUME(lidx >= 0 && ridx >= 0);
|
||||||
|
|
||||||
|
ASSUME(SamplesToDo >= 0);
|
||||||
MixDirectHrtf(RealOut.Buffer[lidx], RealOut.Buffer[ridx], Dry.Buffer, HrtfAccumData,
|
MixDirectHrtf(RealOut.Buffer[lidx], RealOut.Buffer[ridx], Dry.Buffer, HrtfAccumData,
|
||||||
mHrtfState.get(), SamplesToDo);
|
mHrtfState.get(), SamplesToDo);
|
||||||
}
|
}
|
||||||
|
@ -320,13 +320,13 @@ using RowMixerFunc = void(*)(const al::span<float> OutBuffer, const al::span<con
|
|||||||
const float *InSamples, const size_t InStride);
|
const float *InSamples, const size_t InStride);
|
||||||
using HrtfMixerFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
using HrtfMixerFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
||||||
MixHrtfFilter *hrtfparams, const ALsizei BufferSize);
|
MixHrtfFilter *hrtfparams, const size_t BufferSize);
|
||||||
using HrtfMixerBlendFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
using HrtfMixerBlendFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
||||||
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const ALsizei BufferSize);
|
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize);
|
||||||
using HrtfDirectMixerFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
using HrtfDirectMixerFunc = void(*)(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
|
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
|
||||||
const ALsizei BufferSize);
|
const size_t BufferSize);
|
||||||
|
|
||||||
|
|
||||||
#define GAIN_MIX_MAX (1000.0f) /* +60dB */
|
#define GAIN_MIX_MAX (1000.0f) /* +60dB */
|
||||||
|
@ -37,11 +37,11 @@ void MixRow_(const al::span<float> OutBuffer, const al::span<const float> Gains,
|
|||||||
const float *InSamples, const size_t InStride);
|
const float *InSamples, const size_t InStride);
|
||||||
|
|
||||||
template<InstSetType InstTag>
|
template<InstSetType InstTag>
|
||||||
void MixHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, MixHrtfFilter *hrtfparams, const ALsizei BufferSize);
|
void MixHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, MixHrtfFilter *hrtfparams, const size_t BufferSize);
|
||||||
template<InstSetType InstTag>
|
template<InstSetType InstTag>
|
||||||
void MixHrtfBlend_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams, const ALsizei BufferSize);
|
void MixHrtfBlend_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize);
|
||||||
template<InstSetType InstTag>
|
template<InstSetType InstTag>
|
||||||
void MixDirectHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State, const ALsizei BufferSize);
|
void MixDirectHrtf_(FloatBufferLine &LeftOut, FloatBufferLine &RightOut, const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State, const size_t BufferSize);
|
||||||
|
|
||||||
/* Vectorized resampler helpers */
|
/* Vectorized resampler helpers */
|
||||||
inline void InitiatePositionArrays(ALsizei frac, ALint increment, ALsizei *RESTRICT frac_arr, ALsizei *RESTRICT pos_arr, ALsizei size)
|
inline void InitiatePositionArrays(ALsizei frac, ALint increment, ALsizei *RESTRICT frac_arr, ALsizei *RESTRICT pos_arr, ALsizei size)
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
#include "opthelpers.h"
|
#include "opthelpers.h"
|
||||||
|
|
||||||
|
|
||||||
using ApplyCoeffsT = void(ALsizei Offset, float2 *RESTRICT Values, const ALsizei irSize,
|
using ApplyCoeffsT = void(size_t Offset, float2 *RESTRICT Values, const ALsizei irSize,
|
||||||
const HrirArray &Coeffs, const ALfloat left, const ALfloat right);
|
const HrirArray &Coeffs, const ALfloat left, const ALfloat right);
|
||||||
|
|
||||||
template<ApplyCoeffsT &ApplyCoeffs>
|
template<ApplyCoeffsT &ApplyCoeffs>
|
||||||
inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const ALsizei OutPos,
|
const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const ALsizei OutPos,
|
||||||
const ALsizei IrSize, MixHrtfFilter *hrtfparams, const ALsizei BufferSize)
|
const ALsizei IrSize, MixHrtfFilter *hrtfparams, const size_t BufferSize)
|
||||||
{
|
{
|
||||||
ASSUME(OutPos >= 0);
|
ASSUME(OutPos >= 0);
|
||||||
ASSUME(IrSize >= 4);
|
ASSUME(IrSize >= 4);
|
||||||
@ -29,7 +29,7 @@ inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
|||||||
HRTF_HISTORY_LENGTH - hrtfparams->Delay[1] };
|
HRTF_HISTORY_LENGTH - hrtfparams->Delay[1] };
|
||||||
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
|
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
|
||||||
ALfloat stepcount{0.0f};
|
ALfloat stepcount{0.0f};
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
{
|
{
|
||||||
const ALfloat g{gain + gainstep*stepcount};
|
const ALfloat g{gain + gainstep*stepcount};
|
||||||
const ALfloat left{InSamples[Delay[0]++] * g};
|
const ALfloat left{InSamples[Delay[0]++] * g};
|
||||||
@ -39,9 +39,9 @@ inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
|||||||
stepcount += 1.0f;
|
stepcount += 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
LeftOut[OutPos+i] += AccumSamples[i][0];
|
LeftOut[OutPos+i] += AccumSamples[i][0];
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
RightOut[OutPos+i] += AccumSamples[i][1];
|
RightOut[OutPos+i] += AccumSamples[i][1];
|
||||||
|
|
||||||
hrtfparams->Gain = gain + gainstep*stepcount;
|
hrtfparams->Gain = gain + gainstep*stepcount;
|
||||||
@ -51,7 +51,7 @@ template<ApplyCoeffsT &ApplyCoeffs>
|
|||||||
inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const ALsizei OutPos,
|
const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const ALsizei OutPos,
|
||||||
const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams,
|
const ALsizei IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams,
|
||||||
const ALsizei BufferSize)
|
const size_t BufferSize)
|
||||||
{
|
{
|
||||||
const auto &OldCoeffs = oldparams->Coeffs;
|
const auto &OldCoeffs = oldparams->Coeffs;
|
||||||
const ALfloat oldGain{oldparams->Gain};
|
const ALfloat oldGain{oldparams->Gain};
|
||||||
@ -68,7 +68,7 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
|
|||||||
HRTF_HISTORY_LENGTH - oldparams->Delay[1] };
|
HRTF_HISTORY_LENGTH - oldparams->Delay[1] };
|
||||||
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
|
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
|
||||||
ALfloat stepcount{0.0f};
|
ALfloat stepcount{0.0f};
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
{
|
{
|
||||||
const ALfloat g{oldGain + oldGainStep*stepcount};
|
const ALfloat g{oldGain + oldGainStep*stepcount};
|
||||||
const ALfloat left{InSamples[Delay[0]++] * g};
|
const ALfloat left{InSamples[Delay[0]++] * g};
|
||||||
@ -82,7 +82,7 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
|
|||||||
Delay[1] = HRTF_HISTORY_LENGTH - newparams->Delay[1];
|
Delay[1] = HRTF_HISTORY_LENGTH - newparams->Delay[1];
|
||||||
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
|
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
|
||||||
stepcount = 0.0f;
|
stepcount = 0.0f;
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
{
|
{
|
||||||
const ALfloat g{newGainStep*stepcount};
|
const ALfloat g{newGainStep*stepcount};
|
||||||
const ALfloat left{InSamples[Delay[0]++] * g};
|
const ALfloat left{InSamples[Delay[0]++] * g};
|
||||||
@ -92,9 +92,9 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
|
|||||||
stepcount += 1.0f;
|
stepcount += 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
LeftOut[OutPos+i] += AccumSamples[i][0];
|
LeftOut[OutPos+i] += AccumSamples[i][0];
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
RightOut[OutPos+i] += AccumSamples[i][1];
|
RightOut[OutPos+i] += AccumSamples[i][1];
|
||||||
|
|
||||||
newparams->Gain = newGainStep*stepcount;
|
newparams->Gain = newGainStep*stepcount;
|
||||||
@ -103,7 +103,7 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
|
|||||||
template<ApplyCoeffsT &ApplyCoeffs>
|
template<ApplyCoeffsT &ApplyCoeffs>
|
||||||
inline void MixDirectHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
inline void MixDirectHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const al::span<const FloatBufferLine> InSamples, float2 *RESTRICT AccumSamples,
|
const al::span<const FloatBufferLine> InSamples, float2 *RESTRICT AccumSamples,
|
||||||
DirectHrtfState *State, const ALsizei BufferSize)
|
DirectHrtfState *State, const size_t BufferSize)
|
||||||
{
|
{
|
||||||
ASSUME(BufferSize > 0);
|
ASSUME(BufferSize > 0);
|
||||||
|
|
||||||
@ -119,14 +119,14 @@ inline void MixDirectHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOu
|
|||||||
chanstate->Values.size(), AccumSamples);
|
chanstate->Values.size(), AccumSamples);
|
||||||
std::fill_n(accum_iter, BufferSize, float2{});
|
std::fill_n(accum_iter, BufferSize, float2{});
|
||||||
|
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
{
|
{
|
||||||
const ALfloat insample{input[i]};
|
const ALfloat insample{input[i]};
|
||||||
ApplyCoeffs(i, AccumSamples+i, IrSize, Coeffs, insample, insample);
|
ApplyCoeffs(i, AccumSamples+i, IrSize, Coeffs, insample, insample);
|
||||||
}
|
}
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
LeftOut[i] += AccumSamples[i][0];
|
LeftOut[i] += AccumSamples[i][0];
|
||||||
for(ALsizei i{0};i < BufferSize;++i)
|
for(size_t i{0u};i < BufferSize;++i)
|
||||||
RightOut[i] += AccumSamples[i][1];
|
RightOut[i] += AccumSamples[i][1];
|
||||||
|
|
||||||
std::copy_n(AccumSamples + BufferSize, chanstate->Values.size(),
|
std::copy_n(AccumSamples + BufferSize, chanstate->Values.size(),
|
||||||
|
@ -101,7 +101,7 @@ const ALfloat *Resample_<BSincTag,CTag>(const InterpState *state, const ALfloat
|
|||||||
{ return DoResample<do_bsinc>(state, src-state->bsinc.l, frac, increment, dst); }
|
{ return DoResample<do_bsinc>(state, src-state->bsinc.l, frac, increment, dst); }
|
||||||
|
|
||||||
|
|
||||||
static inline void ApplyCoeffs(ALsizei /*Offset*/, float2 *RESTRICT Values, const ALsizei IrSize,
|
static inline void ApplyCoeffs(size_t /*Offset*/, float2 *RESTRICT Values, const ALsizei IrSize,
|
||||||
const HrirArray &Coeffs, const ALfloat left, const ALfloat right)
|
const HrirArray &Coeffs, const ALfloat left, const ALfloat right)
|
||||||
{
|
{
|
||||||
ASSUME(IrSize >= 2);
|
ASSUME(IrSize >= 2);
|
||||||
@ -115,7 +115,7 @@ static inline void ApplyCoeffs(ALsizei /*Offset*/, float2 *RESTRICT Values, cons
|
|||||||
template<>
|
template<>
|
||||||
void MixHrtf_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixHrtf_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
||||||
MixHrtfFilter *hrtfparams, const ALsizei BufferSize)
|
MixHrtfFilter *hrtfparams, const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
||||||
hrtfparams, BufferSize);
|
hrtfparams, BufferSize);
|
||||||
@ -124,7 +124,7 @@ void MixHrtf_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
|||||||
template<>
|
template<>
|
||||||
void MixHrtfBlend_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixHrtfBlend_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
||||||
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const ALsizei BufferSize)
|
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
||||||
oldparams, newparams, BufferSize);
|
oldparams, newparams, BufferSize);
|
||||||
@ -133,7 +133,7 @@ void MixHrtfBlend_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
|||||||
template<>
|
template<>
|
||||||
void MixDirectHrtf_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixDirectHrtf_<CTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
|
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
|
||||||
const ALsizei BufferSize)
|
const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixDirectHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, State, BufferSize);
|
MixDirectHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, State, BufferSize);
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ const ALfloat *Resample_<BSincTag,NEONTag>(const InterpState *state, const ALflo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void ApplyCoeffs(ALsizei /*Offset*/, float2 *RESTRICT Values, const ALsizei IrSize,
|
static inline void ApplyCoeffs(size_t /*Offset*/, float2 *RESTRICT Values, const ALsizei IrSize,
|
||||||
const HrirArray &Coeffs, const ALfloat left, const ALfloat right)
|
const HrirArray &Coeffs, const ALfloat left, const ALfloat right)
|
||||||
{
|
{
|
||||||
ASSUME(IrSize >= 2);
|
ASSUME(IrSize >= 2);
|
||||||
@ -149,21 +149,19 @@ static inline void ApplyCoeffs(ALsizei /*Offset*/, float2 *RESTRICT Values, cons
|
|||||||
|
|
||||||
for(ALsizei c{0};c < IrSize;c += 2)
|
for(ALsizei c{0};c < IrSize;c += 2)
|
||||||
{
|
{
|
||||||
float32x4_t vals = vcombine_f32(vld1_f32((float32_t*)&Values[c ][0]),
|
float32x4_t vals = vld1q_f32((float32_t*)&Values[c][0]);
|
||||||
vld1_f32((float32_t*)&Values[c+1][0]));
|
|
||||||
float32x4_t coefs = vld1q_f32((float32_t*)&Coeffs[c][0]);
|
float32x4_t coefs = vld1q_f32((float32_t*)&Coeffs[c][0]);
|
||||||
|
|
||||||
vals = vmlaq_f32(vals, coefs, leftright4);
|
vals = vmlaq_f32(vals, coefs, leftright4);
|
||||||
|
|
||||||
vst1_f32((float32_t*)&Values[c ][0], vget_low_f32(vals));
|
vst1_f32((float32_t*)&Values[c][0], vals);
|
||||||
vst1_f32((float32_t*)&Values[c+1][0], vget_high_f32(vals));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void MixHrtf_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixHrtf_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
||||||
MixHrtfFilter *hrtfparams, const ALsizei BufferSize)
|
MixHrtfFilter *hrtfparams, const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
||||||
hrtfparams, BufferSize);
|
hrtfparams, BufferSize);
|
||||||
@ -172,7 +170,7 @@ void MixHrtf_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
|||||||
template<>
|
template<>
|
||||||
void MixHrtfBlend_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixHrtfBlend_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
||||||
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const ALsizei BufferSize)
|
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
||||||
oldparams, newparams, BufferSize);
|
oldparams, newparams, BufferSize);
|
||||||
@ -181,7 +179,7 @@ void MixHrtfBlend_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
|||||||
template<>
|
template<>
|
||||||
void MixDirectHrtf_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixDirectHrtf_<NEONTag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
|
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
|
||||||
const ALsizei BufferSize)
|
const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixDirectHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, State, BufferSize);
|
MixDirectHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, State, BufferSize);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ const ALfloat *Resample_<BSincTag,SSETag>(const InterpState *state, const ALfloa
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void ApplyCoeffs(ALsizei Offset, float2 *RESTRICT Values, const ALsizei IrSize,
|
static inline void ApplyCoeffs(size_t Offset, float2 *RESTRICT Values, const ALsizei IrSize,
|
||||||
const HrirArray &Coeffs, const ALfloat left, const ALfloat right)
|
const HrirArray &Coeffs, const ALfloat left, const ALfloat right)
|
||||||
{
|
{
|
||||||
const __m128 lrlr{_mm_setr_ps(left, right, left, right)};
|
const __m128 lrlr{_mm_setr_ps(left, right, left, right)};
|
||||||
@ -119,7 +119,7 @@ static inline void ApplyCoeffs(ALsizei Offset, float2 *RESTRICT Values, const AL
|
|||||||
template<>
|
template<>
|
||||||
void MixHrtf_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixHrtf_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
||||||
MixHrtfFilter *hrtfparams, const ALsizei BufferSize)
|
MixHrtfFilter *hrtfparams, const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
MixHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
||||||
hrtfparams, BufferSize);
|
hrtfparams, BufferSize);
|
||||||
@ -128,7 +128,7 @@ void MixHrtf_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
|||||||
template<>
|
template<>
|
||||||
void MixHrtfBlend_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixHrtfBlend_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
const ALfloat *InSamples, float2 *AccumSamples, const ALsizei OutPos, const ALsizei IrSize,
|
||||||
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const ALsizei BufferSize)
|
const HrtfFilter *oldparams, MixHrtfFilter *newparams, const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
MixHrtfBlendBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, OutPos, IrSize,
|
||||||
oldparams, newparams, BufferSize);
|
oldparams, newparams, BufferSize);
|
||||||
@ -137,7 +137,7 @@ void MixHrtfBlend_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
|||||||
template<>
|
template<>
|
||||||
void MixDirectHrtf_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
void MixDirectHrtf_<SSETag>(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
|
||||||
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
|
const al::span<const FloatBufferLine> InSamples, float2 *AccumSamples, DirectHrtfState *State,
|
||||||
const ALsizei BufferSize)
|
const size_t BufferSize)
|
||||||
{
|
{
|
||||||
MixDirectHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, State, BufferSize);
|
MixDirectHrtfBase<ApplyCoeffs>(LeftOut, RightOut, InSamples, AccumSamples, State, BufferSize);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user