AAX SDK 2.8.0
Avid Audio Extensions Development Kit
Loading...
Searching...
No Matches
AAX_Push2ByteStructAlignment.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3 *
4 * Copyright 2014-2015, 2018, 2023-2024 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * This file is part of the Avid AAX SDK.
8 *
9 * The AAX SDK is subject to commercial or open-source licensing.
10 *
11 * By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
12 * Agreement and Avid Privacy Policy.
13 *
14 * AAX SDK License: https://developer.avid.com/aax
15 * Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
16 *
17 * Or: You may also use this code under the terms of the GPL v3 (see
18 * www.gnu.org/licenses).
19 *
20 * THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 * EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 * DISCLAIMED.
23 *
24 */
25
75/*================================================================================================*/
76
77#ifdef _TMS320C6X
78#error "TI structure packing changes not supported"
79#elif defined (_MSC_VER)
80#pragma warning( disable : 4103 ) // used #pragma pack to change alignment
81#pragma pack(push, 2)
82#elif defined (__GNUC__)
83// Uncomment this warning suppression if you really want to apply packing to a virtual data
84// structure, but note that there is no guarantee of cross-platform compatibility for such
85// a structure. For more information, see the AAX_ALIGN_FILE_ALG macro documentation
86// #ifdef __clang__
87// #pragma clang diagnostic push
88// #pragma clang diagnostic ignored "-Wno-incompatible-ms-struct"
89// #endif
90#pragma ms_struct on
91// #ifdef __clang__
92// #pragma clang diagnostic pop
93// #endif
94#pragma pack(push, 2)
95#elif defined (__MWERKS__)
96#pragma options align=mac68k
97#else
98#error "You need to supply a pragma here to set structure alignment to 2 bytes"
99#endif
100
101// Nesting of struct alignment headers is not allowed
102#ifdef __AAX_CUSTOM_STRUCT_ALIGN_IS_SET__
103#error "Nested AAX struct alignment directives"
104#else
105#define __AAX_CUSTOM_STRUCT_ALIGN_IS_SET__
106#endif