| AAX SDK 2.6.1 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- File List
- File Members

Loading...
Searching...
No Matches
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.

- AAX_ASSERT( condition ) - If the condition is `false` triggers some manner of warning, e.g. a dialog in a developer build or a DigiTrace log in a shipping build. May be used on host or TI.
- AAX_DEBUGASSERT( condition ) - Variant of AAX_ASSERT which is only active in debug builds of the plug-in.
- AAX_TRACE_RELEASE( iPriority, iMessageStr [,params...] ) - Traces a printf- style message to the DigiTrace log file. Enabled using the `DTF_AAXPLUGINS` DigiTrace facility.
- AAX_TRACE( iPriority, iMessageStr [, params...] ) - Variant of AAX_TRACE_RELEASE which only emits logs in debug builds of the plug-in.
- AAX_STACKTRACE_RELEASE( iPriority, iMessageStr [,params...] ) - Similar to AAX_TRACE_RELEASE but prints a stack trace as well as a log message
- AAX_STACKTRACE( iPriority, iMessageStr [,params...] ) - Variant of AAX_STACKTRACE_RELEASE which only emits logs in debug builds of the plug-in.
- AAX_TRACEORSTACKTRACE_RELEASE( iTracePriority, iStackTracePriority, iMessageStr [,params...] ) - Combination of AAX_TRACE_RELEASE and AAX_STACKTRACE_RELEASE; a stack trace is emitted if logging is enabled at `iStackTracePriority`. Otherwise, if logging is enabled at `iTracePriority` then emits a log.

For all trace macros:

`inPriority` is one of

- kAAX_Trace_Priority_Low
- kAAX_Trace_Priority_Normal
- kAAX_Trace_Priority_High
- kAAX_Trace_Priority_Critical

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_Critical AAX_eTracePriorityHost_Critical
#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.
#define | AAX_STACKTRACE_RELEASE(iPriority, ...)
| Print a stack trace statement to the log.
#define | AAX_TRACEORSTACKTRACE_RELEASE(iTracePriority, iStackTracePriority, ...)
| Print a trace statement with an optional stack trace to the log.
#define | AAX_ASSERT(condition)
| Asserts that a condition is true and logs an error if the condition is false.
#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)
#define | AAX_TRACE(iPriority, ...) do { ; } while (0)
| Print a trace statement to the log (debug plug-in builds only)
#define | AAX_STACKTRACE(iPriority, ...) do { ; } while (0)
| Print a stack trace statement to the log (debug builds only)
#define | AAX_TRACEORSTACKTRACE(iTracePriority, iStackTracePriority, ...) do { ; } while (0)
| Print a trace statement with an optional stack trace to the log (debug builds only)

## Typedefs
typedef AAX_ETracePriorityHost | AAX_ETracePriority

## Macro Definition Documentation

## ◆ kAAX_Trace_Priority_None

#define kAAX_Trace_Priority_None AAX_eTracePriorityHost_None

## ◆ kAAX_Trace_Priority_Critical

#define kAAX_Trace_Priority_Critical AAX_eTracePriorityHost_Critical

## ◆ 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__ ); \
};

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);
kAAX_Trace_Priority_Normal
#define kAAX_Trace_Priority_Normal
Definition: AAX_Assert.h:226
AAX_TRACE_RELEASE
#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__ ); \
};

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] | iTracePriority | The log priority at which the trace statement will be printed
  [in] | iStackTracePriority | The 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
@ AAX_eAssertFlags_Log
Logging requested.
Definition: AAX_Enums.h:1343

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);
AAX_ASSERT
#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);
AAX_TRACE
#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] | iTracePriority | The log priority at which the trace statement will be printed
  [in] | iStackTracePriority | The log priority at which the stack trace will be printed

See also
  AAX_TRACE

## Typedef Documentation

## ◆ AAX_ETracePriority

typedef AAX_ETracePriorityHost AAX_ETracePriority