diff options
author | Chris Robinson <[email protected]> | 2019-05-24 06:12:20 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-05-24 06:12:20 -0700 |
commit | 9c63bbd6ce90146939891f56cb0265e5d65ec846 (patch) | |
tree | 8b86fe726dc4dd4ea2d020e61c745657119a3db7 /OpenAL32 | |
parent | 1945b50834e2be380e0ad206f9deefacb455191b (diff) |
Use raw bytes for the buffer data
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alBuffer.h | 3 | ||||
-rw-r--r-- | OpenAL32/alBuffer.cpp | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h index ec9f6c37..22e99b99 100644 --- a/OpenAL32/Include/alBuffer.h +++ b/OpenAL32/Include/alBuffer.h @@ -8,6 +8,7 @@ #include "inprogext.h" #include "atomic.h" #include "vector.h" +#include "albyte.h" /* User formats */ @@ -86,7 +87,7 @@ inline ALsizei FrameSizeFromFmt(FmtChannels chans, FmtType type) struct ALbuffer { - al::vector<ALbyte,16> mData; + al::vector<al::byte,16> mData; ALsizei Frequency{0}; ALbitfieldSOFT Access{0u}; diff --git a/OpenAL32/alBuffer.cpp b/OpenAL32/alBuffer.cpp index 1dc37ec7..4524f81c 100644 --- a/OpenAL32/alBuffer.cpp +++ b/OpenAL32/alBuffer.cpp @@ -288,7 +288,7 @@ void LoadData(ALCcontext *context, ALbuffer *ALBuf, ALuint freq, ALsizei size, U newsize = (newsize+15) & ~0xf; if(newsize != ALBuf->BytesAlloc) { - al::vector<ALbyte,16> newdata(newsize); + al::vector<al::byte,16> newdata(newsize); if((access&AL_PRESERVE_DATA_BIT_SOFT)) { ALsizei tocopy{std::min(newsize, ALBuf->BytesAlloc)}; @@ -318,7 +318,8 @@ void LoadData(ALCcontext *context, ALbuffer *ALBuf, ALuint freq, ALsizei size, U { assert(static_cast<long>(SrcType) == static_cast<long>(DstType)); if(data != nullptr && !ALBuf->mData.empty()) - std::copy_n(static_cast<const ALbyte*>(data), frames*FrameSize, ALBuf->mData.begin()); + std::copy_n(static_cast<const al::byte*>(data), frames*FrameSize, + ALBuf->mData.begin()); ALBuf->OriginalAlign = 1; } ALBuf->OriginalSize = size; |