Attention : vous avez été redirigé vers la plus récente documentation correspondant à votre version générale ( 2019.2.15.7667 ). Si vous souhaitez accéder à la documentation de votre version précise, veuillez télécharger la documentation hors ligne depuis l'Audiokinetic Launcher et sélectionner l'option de documentation Offline dans l'application de création Wwise.
Go to the documentation of this file.
28 #ifndef _AK_AKASSERT_H_
29 #define _AK_AKASSERT_H_
31 #if defined(__EMSCRIPTEN__)
35 #if defined( _DEBUG ) && !(defined AK_DISABLE_ASSERTS)
36 #ifndef AK_ENABLE_ASSERTS
37 #define AK_ENABLE_ASSERTS
41 #ifdef AK_ENABLE_ASSERTS
43 #ifndef AK_ASSERT_HOOK
45 const char * in_pszExpression,
46 const char * in_pszFileName,
49 #define AK_ASSERT_HOOK
53 #if !defined( AKASSERT )
56 #if defined( AK_ENABLE_ASSERTS )
59 #if defined(__EMSCRIPTEN__)
60 #define AKASSERT(Condition) assert(Condition)
63 #define AKASSERT(Condition) ((Condition) ? ((void) 0) : g_pAssertHook( #Condition, __FILE__, __LINE__) )
66 #define AKVERIFY AKASSERT
69 #define AKASSERTD AKASSERT
71 #define AKASSERTD(Condition) ((void)0)
74 #else // defined( AK_ENABLE_ASSERTS )
76 #define AKASSERT(Condition) ((void)0)
77 #define AKASSERTD(Condition) ((void)0)
78 #define AKVERIFY(x) ((void)(x))
80 #endif // defined( AK_ENABLE_ASSERTS )
82 #define AKASSERT_RANGE(Value, Min, Max) (AKASSERT(((Value) >= (Min)) && ((Value) <= (Max))))
84 #define AKASSERTANDRETURN( __Expression, __ErrorCode )\
87 AKASSERT(__Expression);\
91 #define AKASSERTPOINTERORFAIL( __Pointer ) AKASSERTANDRETURN( __Pointer != NULL, AK_Fail )
92 #define AKASSERTSUCCESSORRETURN( __akr ) AKASSERTANDRETURN( __akr == AK_Success, __akr )
94 #define AKASSERTPOINTERORRETURN( __Pointer ) \
95 if ((__Pointer) == NULL)\
97 AKASSERT((__Pointer) == NULL);\
101 #if defined( AK_WIN ) && ( _MSC_VER >= 1600 )
103 #define AKSTATICASSERT( __expr__, __msg__ ) static_assert( (__expr__), (__msg__) )
106 #define AKSTATICASSERT( __expr__, __msg__ ) typedef char __AKSTATICASSERT__[(__expr__)?1:-1]
109 #endif // ! defined( AKASSERT )
111 #ifdef AK_ENABLE_ASSERTS
115 #define DEFINEDUMMYASSERTHOOK void AkAssertHookFunc( \
116 const char* in_pszExpression,\
117 const char* in_pszFileName,\
122 AkAssertHook g_pAssertHook = AkAssertHookFunc;
124 #define DEFINEDUMMYASSERTHOOK
#define AKSOUNDENGINE_API
#define AK_CALLBACK(_type, _name)
void(* AkAssertHook)(const char *in_pszExpression, const char *in_pszFileName, int in_lineNumber)
Besoin d'aide ?
Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !
Visitez notre page d'Aide
Décrivez-nous de votre projet. Nous sommes là pour vous aider.
Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !
Partir du bon pied avec Wwise