diff options
Diffstat (limited to 'alc')
-rw-r--r-- | alc/hrtf.cpp | 4 | ||||
-rw-r--r-- | alc/hrtf.h | 4 | ||||
-rw-r--r-- | alc/panning.cpp | 12 |
3 files changed, 7 insertions, 13 deletions
diff --git a/alc/hrtf.cpp b/alc/hrtf.cpp index a36e4bcc..b8b8d5df 100644 --- a/alc/hrtf.cpp +++ b/alc/hrtf.cpp @@ -281,8 +281,8 @@ std::unique_ptr<DirectHrtfState> DirectHrtfState::Create(size_t num_chans) } void BuildBFormatHrtf(const HrtfStore *Hrtf, DirectHrtfState *state, - const al::span<const AngularPoint> AmbiPoints, const ALfloat (*AmbiMatrix)[MAX_AMBI_CHANNELS], - const ALfloat *AmbiOrderHFGain) + const al::span<const AngularPoint> AmbiPoints, const float (*AmbiMatrix)[MAX_AMBI_CHANNELS], + const al::span<const float,MAX_AMBI_ORDER+1> AmbiOrderHFGain) { using double2 = std::array<double,2>; struct ImpulseResponse { @@ -104,7 +104,7 @@ void GetHrtfCoeffs(const HrtfStore *Hrtf, float elevation, float azimuth, float * ordered and scaled according to the matrix input. */ void BuildBFormatHrtf(const HrtfStore *Hrtf, DirectHrtfState *state, - const al::span<const AngularPoint> AmbiPoints, const ALfloat (*AmbiMatrix)[MAX_AMBI_CHANNELS], - const ALfloat *AmbiOrderHFGain); + const al::span<const AngularPoint> AmbiPoints, const float (*AmbiMatrix)[MAX_AMBI_CHANNELS], + const al::span<const float,MAX_AMBI_ORDER+1> AmbiOrderHFGain); #endif /* ALC_HRTF_H */ diff --git a/alc/panning.cpp b/alc/panning.cpp index 54e84c20..a74e5c30 100644 --- a/alc/panning.cpp +++ b/alc/panning.cpp @@ -640,21 +640,15 @@ void InitHrtfPanning(ALCdevice *device) (device->mRenderMode == HrtfRender) ? "+ Full " : "", device->HrtfName.c_str()); - al::span<const AngularPoint> AmbiPoints{}; - const float (*AmbiMatrix)[MAX_AMBI_CHANNELS]{}; - const float *AmbiOrderHFGain{}; + al::span<const AngularPoint> AmbiPoints{AmbiPoints1O}; + const float (*AmbiMatrix)[MAX_AMBI_CHANNELS]{AmbiMatrix1O}; + al::span<const float,MAX_AMBI_ORDER+1> AmbiOrderHFGain{AmbiOrderHFGain1O}; if(ambi_order >= 2) { AmbiPoints = AmbiPoints2O; AmbiMatrix = AmbiMatrix2O; AmbiOrderHFGain = AmbiOrderHFGain2O; } - else /*if(ambi_order == 1)*/ - { - AmbiPoints = AmbiPoints1O; - AmbiMatrix = AmbiMatrix1O; - AmbiOrderHFGain = AmbiOrderHFGain1O; - } device->mAmbiOrder = ambi_order; const size_t count{AmbiChannelsFromOrder(ambi_order)}; |