Archive for March 29th, 2008

__attribute__ ((aligned(2)) vs. __attribute__ ( (__packed__))

Because alignment, the size of this data structure is 28, instead of 26.

typedef struct tWAVEFORMATEX
{
u_int32_t fcc;
u_int32_t cb;
u_int16_t wFormatTag; /* format type */
u_int16_t nChannels; [...]

Continue reading »