浏览该文件的文档.
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)
介绍一下自己的项目。我们会竭力为您提供帮助。
来注册自己的项目,我们帮您快速入门,不带任何附加条件!
开始 Wwise 之旅