[Question] XMA2WAVEFORMATEX packing
flibitijibibo opened this issue · comments
Hey there!
I'm working on something that uses the XMA2 format, and when looking up the data types I noticed that the struct for XMA2WAVEFORMATEX is tightly packed in this project:
Lines 66 to 92 in 5fec479
This makes sense to me at least, considering every WAVEFORMATEX has always been packed (as far as I know, anyway) but when looking at the original xma2defs.h type, there's no sign of packing anywhere:
https://github.com/hrydgard/minidx9/blob/master/Include/xma2defs.h
Are we missing a pragma somewhere? Or has the packing changed since the last DXSDK released?
I may have made a mistake in xwbtool. Let me check
So the key thing is that the structure is 52 bytes. pack(1), pack(4), pack(8), pack(16) all produce the same layout for x86 and x64, so really the pack statements in xwbtool are misleading.
Updated code in this commit
Excellent, thanks for the help!