diff options
author | Chris Robinson <[email protected]> | 2019-07-04 15:02:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-07-04 15:02:12 -0700 |
commit | 3fe5ef272f436db82beeeee3ad123029e4d219b6 (patch) | |
tree | d7f79f3e99ec15bc8474050c922f227e888f24bd /OpenAL32 | |
parent | 729ffe02d6ab05dc8c62e8332ef1878bbfbdf756 (diff) |
Use a span for MixParams
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 5 | ||||
-rw-r--r-- | OpenAL32/alAuxEffectSlot.cpp | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index d7c22546..2237d3c8 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -308,10 +308,9 @@ using FloatBufferLine = std::array<float,BUFFERSIZE>; struct MixParams { /* Coefficient channel mapping for mixing to the buffer. */ - std::array<BFChannelConfig,MAX_OUTPUT_CHANNELS> AmbiMap; + std::array<BFChannelConfig,MAX_OUTPUT_CHANNELS> AmbiMap{}; - FloatBufferLine *Buffer{nullptr}; - ALuint NumChannels{0u}; + al::span<FloatBufferLine> Buffer; }; struct RealMixParams { diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp index 249f7cf3..55fbc622 100644 --- a/OpenAL32/alAuxEffectSlot.cpp +++ b/OpenAL32/alAuxEffectSlot.cpp @@ -643,7 +643,7 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect FPUCtl mixer_mode{}; ALCdevice *Device{Context->Device}; std::unique_lock<std::mutex> statelock{Device->StateLock}; - State->mOutTarget = {Device->Dry.Buffer, Device->Dry.NumChannels}; + State->mOutTarget = Device->Dry.Buffer; if(State->deviceUpdate(Device) == AL_FALSE) { statelock.unlock(); |