AAX SDK  2.1.1
Avid Audio Extensions Development Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.

Enabled using the DTF_AAXPLUGINS DigiTrace facility

AAX_ASSERT( condition ) - Debug-only for host and TI. If the condition is false, triggers a DigiTrace including the condition, file, and line numbers.

AAX_TRACE( iPriority, iMessageStr [, params...] ) - Debug-only; traces a printf-style message.

AAX_TRACE_RELEASE( iPriority, iMessageStr [, params...] ) - Debug and release; traces a printf-style message.

inPriority: 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 AAX_ASSERT(condition)   do { ; } while (0)
 Asserts that a condition is true, and logs an error if the condition is false. Debug builds only. More...
 
#define AAX_TRACE(iPriority,...)   do { ; } while (0)
 Print a trace statement to the log (debug builds only) More...
 
#define AAX_TRACE_RELEASE(iPriority,...)
 Print a trace statement to the log. More...
 

Typedefs

typedef AAX_ETracePriorityHost AAX_ETracePriority
 

Macro Definition Documentation

#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 AAX_ASSERT (   condition)    do { ; } while (0)

Asserts that a condition is true, and logs an error if the condition is false. Debug builds only.

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);

Referenced by AAX_CParameter< T >::AAX_CParameter().

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

Print a trace statement to the log (debug 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);
See Also
DigiTrace Guide
#define AAX_TRACE_RELEASE (   iPriority,
  ... 
)
Value:
{ \
AAX_CHostServices::Trace ( iPriority, __VA_ARGS__ ); \
};
static AAX_Result Trace(AAX_ETracePriorityHost iPriority, const char *iFormat,...)

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);
See Also
DigiTrace Guide

Typedef Documentation