diff options
author | Chris Robinson <[email protected]> | 2019-04-01 17:27:31 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-04-01 17:27:31 -0700 |
commit | 8781a32df56acb744a1185942bbf038aae07612d (patch) | |
tree | c7b1bf83823619c2ceadb98d4bf9bd13ef78afce /Alc/alc.cpp | |
parent | da8494dd8a23a0e2b1c4ca4973e6311f32a5925c (diff) |
Copy the voice's ambisonic upsampler state when reallocating
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 1ae92779..441add06 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -36,6 +36,7 @@ #include <string> #include <numeric> #include <algorithm> +#include <functional> #include "alMain.h" #include "alcontext.h" @@ -114,6 +115,8 @@ namespace { +using namespace std::placeholders; + /************************************************ * Backends ************************************************/ @@ -2648,6 +2651,11 @@ void AllocateVoices(ALCcontext *context, ALsizei num_voices, ALsizei old_sends) voice->mResampleState = old_voice->mResampleState; + voice->mAmbiScales = old_voice->mAmbiScales; + voice->mAmbiSplitter = old_voice->mAmbiSplitter; + std::for_each(voice->mAmbiSplitter.begin(),voice->mAmbiSplitter.end(), + std::bind(std::mem_fn(&BandSplitter::clear), _1)); + voice->mDirect = old_voice->mDirect; std::copy_n(old_voice->mSend.begin(), s_count, voice->mSend.begin()); |