diff options
Diffstat (limited to 'OpenAL32/Include/alSource.h')
-rw-r--r-- | OpenAL32/Include/alSource.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index d02dbd5b..0343a943 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -21,6 +21,12 @@ struct ALbufferlistitem { ALsizei max_samples; ALsizei num_buffers; ALbuffer *buffers[]; + + static constexpr size_t Sizeof(size_t num_buffers) noexcept + { + return maxz(offsetof(ALbufferlistitem, buffers) + sizeof(ALbuffer*)*num_buffers, + sizeof(ALbufferlistitem)); + } }; |