diff options
author | Chris Robinson <[email protected]> | 2019-01-12 01:25:33 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-01-12 01:25:33 -0800 |
commit | d64eaba3229f48a519586c0436235e3c2809329b (patch) | |
tree | d578ef76627df78c0ec7b1ef2bca1fd1e8af0db1 /Alc/hrtf.cpp | |
parent | ab1667146627e93688cfeb4cf877764f220c0c3e (diff) |
Use a flexible array for DirectHrtfState and ALvoice
Diffstat (limited to 'Alc/hrtf.cpp')
-rw-r--r-- | Alc/hrtf.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/hrtf.cpp b/Alc/hrtf.cpp index 699ec1b9..b0865811 100644 --- a/Alc/hrtf.cpp +++ b/Alc/hrtf.cpp @@ -290,10 +290,10 @@ void GetHrtfCoeffs(const HrtfEntry *Hrtf, ALfloat elevation, ALfloat azimuth, AL } -std::unique_ptr<DirectHrtfState> DirectHrtfState::Create(ALsizei num_chans) +std::unique_ptr<DirectHrtfState> DirectHrtfState::Create(size_t num_chans) { - void *ptr{al_calloc(16, FAM_SIZE(DirectHrtfState, Chan, num_chans))}; - return std::unique_ptr<DirectHrtfState>{new (ptr) DirectHrtfState{}}; + void *ptr{al_calloc(16, DirectHrtfState::Sizeof(num_chans))}; + return std::unique_ptr<DirectHrtfState>{new (ptr) DirectHrtfState{num_chans}}; } void BuildBFormatHrtf(const HrtfEntry *Hrtf, DirectHrtfState *state, const ALsizei NumChannels, const AngularPoint *AmbiPoints, const ALfloat (*RESTRICT AmbiMatrix)[MAX_AMBI_COEFFS], const ALsizei AmbiCount, const ALfloat *RESTRICT AmbiOrderHFGain) |