Warning: you were redirected to the latest documentation corresponding to your major release ( 2023.1.10.8659 ). 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))
111 #if !defined(AK_ENDIANNESS_LITTLE) && !defined(AK_ENDIANNESS_BIG)
112 #define AK_ENDIANNESS_LITTLE
117 #if defined(__GNUC__)
118 #define AK_UNALIGNED __attribute__((aligned(1)))
119 #elif defined(_MSC_VER) && !defined(AK_CPU_X86) // __unaligned not supported on 32-bit x86
120 #define AK_UNALIGNED __unaligned
124 #endif // AK_UNALIGNED
127 #if defined(__GNUC__)
128 #define AK_SELECTANY __attribute__((weak))
129 #elif defined(_MSC_VER)
130 #define AK_SELECTANY __declspec(selectany)
134 #endif // AK_SELECTANY
136 #if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
140 #if (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
144 #if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
148 #if defined(AK_CPP11)
149 #define AK_FINAL final
154 #if defined(AK_CPP17)
155 #define AK_NODISCARD [[nodiscard]]
160 #if defined(AK_CPU_X86_64) || defined(AK_CPU_ARM_64)
161 #define AK_POINTER_64
162 #endif // #if defined(AK_CPU_X86_64) || defined(AK_CPU_ARM_64)
164 #if !defined(AK_UNUSEDVAR)
166 #define AK_UNUSEDVAR(x) ((void)(x))
169 #if defined(AK_SUPPORT_THREADS)
170 #define AK_THREAD_LOCAL thread_local
172 #define AK_THREAD_LOCAL
177 #if defined(__clang__)
178 #define AK_DISABLE_OPTIMIZATIONS _Pragma("clang optimize off")
179 #define AK_ENABLE_OPTIMIZATIONS _Pragma("clang optimize on")
180 #elif defined(__GNUC__)
181 #define AK_DISABLE_OPTIMIZATIONS _Pragma("GCC optimize (\"O0\")")
182 #define AK_ENABLE_OPTIMIZATIONS _Pragma("GCC optimize (\"O2\")")
183 #elif defined(_MSC_VER)
184 #define AK_DISABLE_OPTIMIZATIONS __pragma(optimize("", off))
185 #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