Warning: you were redirected to the latest documentation corresponding to your major release ( 2024.1.1.8691 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Go to the documentation of this file.
34 #if defined( NN_NINTENDO_SDK )
35 #include "nn/nn_Platform.h"
38 #if defined( AK_NULL_PLATFORM )
41 #include <AK/SoundEngine/Platforms/Generic/AkTypes.h>
43 #elif defined( NN_BUILD_TARGET_PLATFORM_NX )
47 #elif defined( _GAMING_XBOX )
51 #elif defined( _WIN32 ) || defined ( _WIN64 ) || defined( WINAPI_FAMILY )
55 #elif defined( __APPLE__ )
59 #elif defined( __ORBIS__ )
63 #elif defined(__HARMONY__)
67 #elif defined( __PROSPERO__ )
71 #elif defined( __ANDROID__ ) && !defined (AK_LINUX_AOSP)
75 #elif defined( __linux__ )
79 #elif defined( __EMSCRIPTEN__ )
83 #elif defined( __QNX__ )
85 #include <AK/SoundEngine/Platforms/QNX/AkTypes.h>
87 #elif defined(__has_include)
93 #error Unsupported platform, or platform-specific symbols not defined
99 #define AK_ALIGN( _declaration_, _alignment_ ) _declaration_
101 #if defined(_MSC_VER)
102 #define AK_ALIGN( _declaration_, _alignment_ ) __declspec( align( _alignment_ ) ) _declaration_
104 #define AK_ALIGN( _declaration_, _alignment_ ) _declaration_ __attribute__( ( aligned( _alignment_ ) ) )
109 #define AK_ALIGN_TO_NEXT_BOUNDARY( __num__, __boundary__ ) (((__num__) + ((__boundary__)-1)) & ~((__boundary__)-1))
110 #define AK_IS_POWER_OF_TWO(__num__) (((__num__) & ((__num__) - 1)) == 0)
112 #if !defined(AK_ENDIANNESS_LITTLE) && !defined(AK_ENDIANNESS_BIG)
113 #define AK_ENDIANNESS_LITTLE
118 #if defined(__GNUC__)
119 #define AK_UNALIGNED __attribute__((aligned(1)))
120 #elif defined(_MSC_VER) && !defined(AK_CPU_X86) // __unaligned not supported on 32-bit x86
121 #define AK_UNALIGNED __unaligned
125 #endif // AK_UNALIGNED
128 #if defined(__GNUC__)
129 #define AK_SELECTANY __attribute__((weak))
130 #elif defined(_MSC_VER)
131 #define AK_SELECTANY __declspec(selectany)
135 #endif // AK_SELECTANY
137 #if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
141 #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
145 #define AK_NODISCARD [[nodiscard]]
147 #if defined(AK_CPU_X86_64) || defined(AK_CPU_ARM_64)
148 #define AK_POINTER_64
149 #endif // #if defined(AK_CPU_X86_64) || defined(AK_CPU_ARM_64)
151 #if !defined(AK_UNUSEDVAR)
153 #define AK_UNUSEDVAR(x) ((void)(x))
156 #if defined(AK_SUPPORT_THREADS)
157 #define AK_THREAD_LOCAL thread_local
159 #define AK_THREAD_LOCAL
164 #if defined(__clang__)
165 #define AK_DISABLE_OPTIMIZATIONS _Pragma("clang optimize off")
166 #define AK_ENABLE_OPTIMIZATIONS _Pragma("clang optimize on")
167 #elif defined(__GNUC__)
168 #define AK_DISABLE_OPTIMIZATIONS _Pragma("GCC optimize (\"O0\")")
169 #define AK_ENABLE_OPTIMIZATIONS _Pragma("GCC optimize (\"O2\")")
170 #elif defined(_MSC_VER)
171 #define AK_DISABLE_OPTIMIZATIONS __pragma(optimize("", off))
172 #define AK_ENABLE_OPTIMIZATIONS __pragma(optimize("", on))
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise