aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alSource.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-02-11 11:14:34 -0800
committerChris Robinson <[email protected]>2019-02-11 11:14:34 -0800
commit21aaa18c500c554fc6af39d9256b83cff8d07516 (patch)
treeeb0b8a3dd0f5b79f80aef37c8d58a3687ddf2747 /OpenAL32/Include/alSource.h
parent995c9649cbaa16742ef7c9c20aa58e422ba90a35 (diff)
Get rid of the FAM_SIZE macro
Diffstat (limited to 'OpenAL32/Include/alSource.h')
-rw-r--r--OpenAL32/Include/alSource.h6
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));
+ }
};