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 /OpenAL32 | |
parent | da8494dd8a23a0e2b1c4ca4973e6311f32a5925c (diff) |
Copy the voice's ambisonic upsampler state when reallocating
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alu.h | 2 | ||||
-rw-r--r-- | OpenAL32/alSource.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 9c33779d..3856bc72 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -255,7 +255,7 @@ struct ALvoice { InterpState mResampleState; std::array<ALfloat,MAX_INPUT_CHANNELS> mAmbiScales; - BandSplitter mAmbiSplitter[MAX_INPUT_CHANNELS]; + std::array<BandSplitter,MAX_INPUT_CHANNELS> mAmbiSplitter; struct { int FilterType; diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp index 17fbcb03..fcdce9c4 100644 --- a/OpenAL32/alSource.cpp +++ b/OpenAL32/alSource.cpp @@ -2895,7 +2895,7 @@ AL_API ALvoid AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources) } voice->mAmbiSplitter[0].init(400.0f / static_cast<ALfloat>(device->Frequency)); - std::fill_n(std::begin(voice->mAmbiSplitter)+1, voice->mNumChannels-1, + std::fill_n(voice->mAmbiSplitter.begin()+1, voice->mNumChannels-1, voice->mAmbiSplitter[0]); voice->mFlags |= VOICE_IS_AMBISONIC; } |