AAX SDK  2.4.1
Avid Audio Extensions Development Kit
Macros | Typedefs
AAX_Assert.h File Reference
#include "AAX_Enums.h"
#include "AAX_CHostServices.h"

Go to the source code of this file.

Description

Declarations for cross-platform AAX_ASSERT, AAX_TRACE and related facilities.

For all trace macros:

inPriority is one of

These correspond to how the trace messages are filtered using DigiTrace.

Note
Disabling the DTF_AAXPLUGINS facility will slightly reduce the overhead of trace statements and chip communication on HDX systems.

==============================================================================

Macros

#define kAAX_Trace_Priority_None   AAX_eTracePriorityHost_None
 
#define kAAX_Trace_Priority_High   AAX_eTracePriorityHost_High
 
#define kAAX_Trace_Priority_Normal   AAX_eTracePriorityHost_Normal
 
#define kAAX_Trace_Priority_Low   AAX_eTracePriorityHost_Low
 
#define kAAX_Trace_Priority_Lowest   AAX_eTracePriorityHost_Lowest
 
#define AAX_TRACE_RELEASE(iPriority, ...)
 Print a trace statement to the log. More...
 
#define AAX_STACKTRACE_RELEASE(iPriority, ...)
 Print a stack trace statement to the log. More...
 
#define AAX_TRACEORSTACKTRACE_RELEASE(iTracePriority, iStackTracePriority, ...)
 Print a trace statement with an optional stack trace to the log. More...
 
#define AAX_ASSERT(condition)
 Asserts that a condition is true and logs an error if the condition is false. More...
 
#define AAX_DEBUGASSERT(condition)   do { ; } while (0)
 Asserts that a condition is true and logs an error if the condition is false (debug plug-in builds only) More...
 
#define AAX_TRACE(iPriority, ...)   do { ; } while (0)
 Print a trace statement to the log (debug plug-in builds only) More...
 
#define AAX_STACKTRACE(iPriority, ...)   do { ; } while (0)
 Print a stack trace statement to the log (debug builds only) More...
 
#define AAX_TRACEORSTACKTRACE(iTracePriority, iStackTracePriority, ...)   do { ; } while (0)
 Print a trace statement with an optional stack trace to the log (debug builds only) More...
 

Typedefs

typedef AAX_ETracePriorityHost AAX_ETracePriority
 

Macro Definition Documentation

◆ kAAX_Trace_Priority_None

#define kAAX_Trace_Priority_None   AAX_eTracePriorityHost_None

◆ kAAX_Trace_Priority_High

#define kAAX_Trace_Priority_High   AAX_eTracePriorityHost_High

◆ kAAX_Trace_Priority_Normal

#define kAAX_Trace_Priority_Normal   AAX_eTracePriorityHost_Normal

◆ kAAX_Trace_Priority_Low

#define kAAX_Trace_Priority_Low   AAX_eTracePriorityHost_Low

◆ kAAX_Trace_Priority_Lowest

#define kAAX_Trace_Priority_Lowest   AAX_eTracePriorityHost_Lowest

◆ AAX_TRACE_RELEASE

#define AAX_TRACE_RELEASE (   iPriority,
  ... 
)
Value:
{ \
AAX_CHostServices::Trace ( iPriority, __VA_ARGS__ ); \
};
static AAX_Result Trace(AAX_ETracePriorityHost iPriority, const char *iMessage,...)
Log a trace message.

Print a trace statement to the log.

Use this macro to print a trace statement to the log file. This macro will be included in all builds of the plug-in.

Notes

  • This macro is compatible with bost host and embedded (AAX DSP) environments
  • Subject to a total line limit of 256 chars

Usage Each invocation of this macro takes a trace priority and a printf-style logging string.

Because output from this macro will be enabled on end users' systems under certain tracing configurations, logs should always be formatted with some standard information to avoid confusion between logs from different plug-ins. This is the recommended formatting for AAX_TRACE_RELEASE logs:

[Manufacturer name] [Plug-in name] [Plug-in version][logging text (indented)]

For example:

AAX_TRACE_RELEASE(kAAX_Trace_Priority_Normal, "%s %s %s;\tMy float: %f, My C-string: %s",
"MyCompany", "MyPlugIn", "1.0.2", myFloat, myCString);
#define kAAX_Trace_Priority_Normal
Definition: AAX_Assert.h:226
#define AAX_TRACE_RELEASE(iPriority,...)
Print a trace statement to the log.
Definition: AAX_Assert.h:232
See also
DigiTrace Guide

◆ AAX_STACKTRACE_RELEASE

#define AAX_STACKTRACE_RELEASE (   iPriority,
  ... 
)
Value:
{ \
AAX_CHostServices::StackTrace ( iPriority, iPriority, __VA_ARGS__ ); \
};
static AAX_Result StackTrace(AAX_ETracePriorityHost iTracePriority, AAX_ETracePriorityHost iStackTracePriority, const char *iMessage,...)
Log a trace message or a stack trace.

Print a stack trace statement to the log.

See also
AAX_TRACE_RELEASE

◆ AAX_TRACEORSTACKTRACE_RELEASE

#define AAX_TRACEORSTACKTRACE_RELEASE (   iTracePriority,
  iStackTracePriority,
  ... 
)
Value:
{ \
AAX_CHostServices::StackTrace ( iTracePriority, iStackTracePriority, __VA_ARGS__ ); \
};

Print a trace statement with an optional stack trace to the log.

Parameters
[in]iTracePriorityThe log priority at which the trace statement will be printed
[in]iStackTracePriorityThe log priority at which the stack trace will be printed
See also
AAX_TRACE_RELEASE

◆ AAX_ASSERT

#define AAX_ASSERT (   condition)
Value:
{ \
if( ! ( condition ) ) { \
AAX_CHostServices::HandleAssertFailure( __FILE__, __LINE__, #condition, (int32_t)AAX_eAssertFlags_Log ); \
} \
};
@ AAX_eAssertFlags_Log
Logging requested.
Definition: AAX_Enums.h:1322
static AAX_Result HandleAssertFailure(const char *iFile, int32_t iLine, const char *iNote, int32_t iFlags=AAX_eAssertFlags_Default)
Handle an assertion failure.

Asserts that a condition is true and logs an error if the condition is false.

Notes

  • This macro will be compiled out of release builds.
  • This macro is compatible with bost host and embedded (AAX DSP) environments.

Usage Each invocation of this macro takes a single argument, which is interpreted as a bool.

AAX_ASSERT(desiredValue == variableUnderTest);
#define AAX_ASSERT(condition)
Asserts that a condition is true and logs an error if the condition is false.
Definition: AAX_Assert.h:268

◆ AAX_DEBUGASSERT

#define AAX_DEBUGASSERT (   condition)    do { ; } while (0)

Asserts that a condition is true and logs an error if the condition is false (debug plug-in builds only)

See also
AAX_ASSERT

◆ AAX_TRACE

#define AAX_TRACE (   iPriority,
  ... 
)    do { ; } while (0)

Print a trace statement to the log (debug plug-in builds only)

Use this macro to print a trace statement to the log file from debug builds of a plug-in.

Notes

  • This macro will be compiled out of release builds
  • This macro is compatible with bost host and embedded (AAX DSP) environments
  • Subject to a total line limit of 256 chars

Usage Each invocation of this macro takes a trace priority and a printf-style logging string. For example:

AAX_TRACE(kAAX_Trace_Priority_Normal, "My float: %f, My C-string: %s", myFloat, myCString);
#define AAX_TRACE(iPriority,...)
Print a trace statement to the log (debug plug-in builds only)
Definition: AAX_Assert.h:276
See also
DigiTrace Guide

◆ AAX_STACKTRACE

#define AAX_STACKTRACE (   iPriority,
  ... 
)    do { ; } while (0)

Print a stack trace statement to the log (debug builds only)

See also
AAX_TRACE

◆ AAX_TRACEORSTACKTRACE

#define AAX_TRACEORSTACKTRACE (   iTracePriority,
  iStackTracePriority,
  ... 
)    do { ; } while (0)

Print a trace statement with an optional stack trace to the log (debug builds only)

Parameters
[in]iTracePriorityThe log priority at which the trace statement will be printed
[in]iStackTracePriorityThe log priority at which the stack trace will be printed
See also
AAX_TRACE

Typedef Documentation

◆ AAX_ETracePriority