diff options
author | Chris Robinson <[email protected]> | 2020-01-13 19:45:13 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-01-13 19:45:13 -0800 |
commit | e889282131a8d6bb4dd8efea6b4e1f65fe38f0f4 (patch) | |
tree | bf658729fbb0342e1ff23a72edd16052dc174497 | |
parent | a1a107f57662db090695fd7dde7712202c50af4b (diff) |
Get rid of an unnecessary struct
-rw-r--r-- | alc/hrtf.h | 4 | ||||
-rw-r--r-- | alc/voice.cpp | 6 | ||||
-rw-r--r-- | alc/voice.h | 2 |
3 files changed, 4 insertions, 8 deletions
@@ -61,10 +61,6 @@ struct HrtfStore { }; -struct HrtfState { - alignas(16) std::array<float,HRTF_HISTORY_LENGTH> History; -}; - struct HrtfFilter { alignas(16) HrirArray Coeffs; ALuint Delay[2]; diff --git a/alc/voice.cpp b/alc/voice.cpp index c3735acb..8c8b59c4 100644 --- a/alc/voice.cpp +++ b/alc/voice.cpp @@ -430,12 +430,12 @@ void DoHrtfMix(const float *samples, const ALuint DstBufferSize, DirectParams &p auto &AccumSamples = Device->HrtfAccumData; /* Copy the HRTF history and new input samples into a temp buffer. */ - auto src_iter = std::copy(parms.Hrtf.State.History.begin(), parms.Hrtf.State.History.end(), + auto src_iter = std::copy(parms.Hrtf.History.begin(), parms.Hrtf.History.end(), std::begin(HrtfSamples)); std::copy_n(samples, DstBufferSize, src_iter); /* Copy the last used samples back into the history buffer for later. */ - std::copy_n(std::begin(HrtfSamples) + DstBufferSize, parms.Hrtf.State.History.size(), - parms.Hrtf.State.History.begin()); + std::copy_n(std::begin(HrtfSamples) + DstBufferSize, parms.Hrtf.History.size(), + parms.Hrtf.History.begin()); /* If fading, the old gain is not silence, and this is the first mixing * pass, fade between the IRs. diff --git a/alc/voice.h b/alc/voice.h index 4bfee7bc..9e96bdc5 100644 --- a/alc/voice.h +++ b/alc/voice.h @@ -101,7 +101,7 @@ struct DirectParams { struct { HrtfFilter Old; HrtfFilter Target; - HrtfState State; + alignas(16) std::array<float,HRTF_HISTORY_LENGTH> History; } Hrtf; struct { |