AAX SDK  2.1.1
Avid Audio Extensions Development Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AAX_UtilsNative.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3 
4  * Copyright 2013 by Avid Technology, Inc.
5  * All rights reserved.
6  *
7  * CONFIDENTIAL: This document contains confidential information. Do not
8  * read or examine this document unless you are an Avid Technology employee
9  * or have signed a non-disclosure agreement with Avid Technology which protects
10  * the confidentiality of this document. DO NOT DISCLOSE ANY INFORMATION
11  * CONTAINED IN THIS DOCUMENT TO ANY THIRD-PARTY WITHOUT THE PRIOR WRITTEN CONSENT
12  * OF Avid Technolgy, INC.
13  *
14  */
15 
22 /*================================================================================================*/
23 
24 
25 #pragma once
26 
27 #ifndef _AAX_UTILSNATIVE_H_
28 #define _AAX_UTILSNATIVE_H_
29 
30 
31 #ifndef _TMS320C6X
32 
33 // AAX Includes
34 #include "AAX_CString.h"
35 #include "AAX_IString.h"
36 #include "AAX_Assert.h"
37 #include "AAX.h"
38 
39 // Standard Library Includes
40 #include <cmath> // for log()
41 #include <string.h>
42 
43 
44 //------------------------------------------------
45 #pragma mark Utility function declarations
46 
47 namespace AAX
48 {
49 
53  inline double SafeLog (double aValue) { return aValue <= 0.0 ? 0.0 : log(aValue); }
54 
58  inline float SafeLogf (float aValue) { return aValue <= 0.0f ? 0.0f : logf(aValue); }
59 
62  inline AAX_CBoolean IsParameterIDEqual ( AAX_CParamID iParam1, AAX_CParamID iParam2 ) { return static_cast<AAX_CBoolean>( strcmp ( iParam1, iParam2 ) == 0 ); }
63 
66  inline AAX_CBoolean IsEffectIDEqual ( const AAX_IString * iEffectID1, const AAX_IString * iEffectID2 ) { return static_cast<AAX_CBoolean>( strcmp ( iEffectID1->Get(), iEffectID2->Get() ) == 0 ); }
67 
70  inline AAX_CBoolean IsAvidNotification ( AAX_CTypeID inNotificationID ) { return static_cast<AAX_CBoolean>(('AX ' <= inNotificationID && 'AX~~' >= inNotificationID) || (inNotificationID == 'ASPv')); }
71 
72 } // namespace AAX
73 
74 #endif // #ifndef _TMS320C6X
75 
76 #endif // #ifndef _AAX_UTILSNATIVE_H_
Various utility definitions for AAX.
uint8_t AAX_CBoolean
Cross-compiler boolean type used by AAX interfaces.
Definition: AAX.h:110
uint32_t AAX_CTypeID
Matches type of OSType used in classic plugins.
Definition: AAX.h:117
An AAX string interface.
A simple string container that can be passed across a binary boundary. This class, for simplicity, is not versioned and thus can never change.
Definition: AAX_IString.h:40
virtual const char * Get() const =0
const char * AAX_CParamID
Parameter identifier.
Definition: AAX.h:128
A generic AAX string class with similar functionality to std::string.
Declarations for cross-platform AAX_ASSERT, AAX_TRACE and related facilities.