From 8781a32df56acb744a1185942bbf038aae07612d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 1 Apr 2019 17:27:31 -0700 Subject: Copy the voice's ambisonic upsampler state when reallocating --- OpenAL32/Include/alu.h | 2 +- OpenAL32/alSource.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenAL32') 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 mAmbiScales; - BandSplitter mAmbiSplitter[MAX_INPUT_CHANNELS]; + std::array 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(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; } -- cgit v1.2.3