| AAX SDK 2.8.0 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- File List
- File Members

Loading...
Searching...
No Matches
AAX_Push2ByteStructAlignment.h File Reference

Go to the source code of this file.

## Description

Set the struct alignment to 2-byte. This file will throw an error on platforms that do not support 2-byte alignment (i.e. TI DSPs)

When setting the alignment for a struct in order to match a particular environment (e.g. host/plug-in binary compatibility) the following macros are recommended:

- AAX_ALIGN_FILE_HOST
- AAX_ALIGN_FILE_ALG
- AAX_ALIGN_FILE_RESET

# Usage notes

- Always follow an inclusion of this file with a matching inclusion of AAX_PopStructAlignment.h

- Do not place other file `#include` after this file. For example:
  // HeaderFile1.h
  #include AAX_Push2ByteStructAlignment.h
  #include HeaderFile2.h // this file now has 2-byte alignment also!!
  // HeaderFile1.h definitions...
  #include AAX_PopStructAlignment.h
  // end HeaderFile1.h
  This will cause problems if HeaderFile2.h is included elsewhere without the 2-byte alignment which will manifest as hard to find run-time bugs. The proper usage is:
  // HeaderFile1.h
  #include HeaderFile2.h
  #include AAX_Push2ByteStructAlignment.h
  // HeaderFile1.h definitions...
  #include AAX_PopStructAlignment.h
  // end HeaderFile1.h

See also
  AAX_Push4ByteStructAlignment.h
  AAX_Push8ByteStructAlignment.h
  AAX_PopStructAlignment.h