aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alu.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-10-05 21:23:31 -0700
committerChris Robinson <[email protected]>2019-10-05 21:23:31 -0700
commitacb6baad906912aa7e744552905afcdcec521c14 (patch)
tree76ad2f5a1d343cef3415ab998a89b7541105f931 /alc/alu.cpp
parenteb89faf9632048568c953c21a6b58e4c4664cc05 (diff)
Use std::array instead of plain arrays in a couple places
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r--alc/alu.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index 6d3e5549..8c2ee164 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -132,11 +132,6 @@ struct ChanMap {
ALfloat elevation;
};
-void ClearArray(ALfloat (&f)[MAX_OUTPUT_CHANNELS])
-{
- std::fill(std::begin(f), std::end(f), 0.0f);
-}
-
HrtfDirectMixerFunc MixDirectHrtf = MixDirectHrtf_<CTag>;
inline MixerFunc SelectMixer()
@@ -633,9 +628,9 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat xpos, const ALfloat ypo
[NumSends](ALvoice::ChannelData &chandata) -> void
{
chandata.mDryParams.Hrtf.Target = HrtfFilter{};
- ClearArray(chandata.mDryParams.Gains.Target);
+ chandata.mDryParams.Gains.Target.fill(0.0f);
std::for_each(chandata.mWetParams.begin(), chandata.mWetParams.begin()+NumSends,
- [](SendParams &params) -> void { ClearArray(params.Gains.Target); });
+ [](SendParams &params) -> void { params.Gains.Target.fill(0.0f); });
});
voice->mFlags &= ~(VOICE_HAS_HRTF | VOICE_HAS_NFC);