aboutsummaryrefslogtreecommitdiffstats
path: root/al/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'al/buffer.h')
-rw-r--r--al/buffer.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/al/buffer.h b/al/buffer.h
index 6b1d45f5..bdc87e07 100644
--- a/al/buffer.h
+++ b/al/buffer.h
@@ -39,27 +39,14 @@ enum UserFmtChannels : unsigned char {
struct ALbuffer {
- al::vector<al::byte,16> mData;
+ BufferStorage mBuffer;
- ALuint Frequency{0u};
ALbitfieldSOFT Access{0u};
- ALuint SampleLen{0u};
-
- FmtChannels mFmtChannels{};
- FmtType mFmtType{};
UserFmtType OriginalType{};
ALuint OriginalSize{0};
ALuint OriginalAlign{0};
- ALenum AmbiLayout{AL_FUMA_SOFT};
- ALenum AmbiScaling{AL_FUMA_SOFT};
- /* AmbiOrder is only updated when loading new data. */
- ALuint AmbiOrder{0};
-
- LPALBUFFERCALLBACKTYPESOFT Callback{nullptr};
- void *UserData{nullptr};
-
ALuint LoopStart{0u};
ALuint LoopEnd{0u};
@@ -77,10 +64,9 @@ struct ALbuffer {
/* Self ID */
ALuint id{0};
- inline ALuint bytesFromFmt() const noexcept { return BytesFromFmt(mFmtType); }
- inline ALuint channelsFromFmt() const noexcept
- { return ChannelsFromFmt(mFmtChannels, AmbiOrder); }
- inline ALuint frameSizeFromFmt() const noexcept { return channelsFromFmt() * bytesFromFmt(); }
+ inline ALuint bytesFromFmt() const noexcept { return mBuffer.bytesFromFmt(); }
+ inline ALuint channelsFromFmt() const noexcept { return mBuffer.channelsFromFmt(); }
+ inline ALuint frameSizeFromFmt() const noexcept { return mBuffer.frameSizeFromFmt(); }
DISABLE_ALLOC()
};