diff options
author | Chris Robinson <[email protected]> | 2019-05-28 16:22:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-05-28 16:22:36 -0700 |
commit | c80ee5b7014d12675e2c615574c9f3f3354ffd1b (patch) | |
tree | 75ac5c7197ab7d8994854455c7261a9d42a99c82 /OpenAL32/Include/alMain.h | |
parent | 7ce2b632f51292c26014ad2efeb4b5429c3bf04f (diff) |
Use std::array for most mixing buffer arrays
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r-- | OpenAL32/Include/alMain.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 7019a6d4..7538ade2 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -305,6 +305,8 @@ struct BFChannelConfig { */ #define BUFFERSIZE 1024 +using FloatBufferLine = std::array<float,BUFFERSIZE>; + /* Maximum number of samples to pad on either end of a buffer for resampling. * Note that both the beginning and end need padding! */ @@ -315,14 +317,14 @@ struct MixParams { /* Coefficient channel mapping for mixing to the buffer. */ std::array<BFChannelConfig,MAX_OUTPUT_CHANNELS> AmbiMap; - ALfloat (*Buffer)[BUFFERSIZE]{nullptr}; + FloatBufferLine *Buffer{nullptr}; ALsizei NumChannels{0}; }; struct RealMixParams { std::array<ALint,MaxChannels> ChannelIndex{}; - ALfloat (*Buffer)[BUFFERSIZE]{nullptr}; + FloatBufferLine *Buffer{nullptr}; ALsizei NumChannels{0}; }; @@ -405,7 +407,7 @@ struct ALCdevice { alignas(16) float2 HrtfAccumData[BUFFERSIZE + HRIR_LENGTH]; /* Mixing buffer used by the Dry mix and Real output. */ - al::vector<std::array<ALfloat,BUFFERSIZE>, 16> MixBuffer; + al::vector<FloatBufferLine, 16> MixBuffer; /* The "dry" path corresponds to the main output. */ MixParams Dry; |