aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-03-20 14:49:46 -0700
committerChris Robinson <[email protected]>2014-03-20 14:49:46 -0700
commite6e3937fa9d1d192bc26b900438b45c0e6eb5be2 (patch)
tree97e65b55932f8b925e733273ba238a3b18b87536 /OpenAL32/Include
parent168149ce9daedb2e3d9a11b7fee2b22b2e4daf7a (diff)
Use flexible array members to pad the device and context structs
This helps avoid the convoluted math otherwise required to ensure the default slot and listener, respectively, are aligned.
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index b62ad9c7..a00f2d4c 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -686,6 +686,9 @@ struct ALCdevice_struct
void *ExtraData; // For the backend's use
ALCdevice *volatile next;
+
+ /* Memory space used by the default slot (Playback devices only) */
+ ALIGN(16) ALCbyte _slot_mem[];
};
// Frequency was requested by the app or config file
@@ -752,6 +755,9 @@ struct ALCcontext_struct
const ALCchar *ExtensionList;
ALCcontext *volatile next;
+
+ /* Memory space used by the listener */
+ ALIGN(16) ALCbyte _listener_mem[];
};
ALCcontext *GetContextRef(void);