AAX SDK 2.6.1
Avid Audio Extensions Development Kit
Loading...
Searching...
No Matches
AAX_UtilsNative.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3
4 * Copyright 2013-2017, 2023 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * CONFIDENTIAL: this document contains confidential information of Avid. Do
8 * not disclose to any third party. Use of the information contained in this
9 * document is subject to an Avid SDK license.
10 *
11 */
12
19/*================================================================================================*/
20
21
22#pragma once
23
24#ifndef _AAX_UTILSNATIVE_H_
25#define _AAX_UTILSNATIVE_H_
26
27
28#ifndef _TMS320C6X
29
30// AAX Includes
31#include "AAX_CString.h"
32#include "AAX_IString.h"
33#include "AAX_Assert.h"
34#include "AAX.h"
35
36// Standard Library Includes
37#include <cmath> // for log()
38#include <string.h>
39
40
41//------------------------------------------------
42#pragma mark Utility functions
43
44namespace AAX
45{
46
50 inline double SafeLog (double aValue) { return aValue <= 0.0 ? 0.0 : log(aValue); }
51
55 inline float SafeLogf (float aValue) { return aValue <= 0.0f ? 0.0f : logf(aValue); }
56
59 inline AAX_CBoolean IsParameterIDEqual ( AAX_CParamID iParam1, AAX_CParamID iParam2 ) { return static_cast<AAX_CBoolean>( strcmp ( iParam1, iParam2 ) == 0 ); }
60
63 inline AAX_CBoolean IsEffectIDEqual ( const AAX_IString * iEffectID1, const AAX_IString * iEffectID2 ) { return static_cast<AAX_CBoolean>( strcmp ( iEffectID1->Get(), iEffectID2->Get() ) == 0 ); }
64
67 inline AAX_CBoolean IsAvidNotification ( AAX_CTypeID inNotificationID )
68 {
69 return (AAX_CBoolean)((('A' == ((inNotificationID & 0xFF000000) >> 24)) &&
70 ('X' == ((inNotificationID & 0x00FF0000) >> 16))) ||
71 (inNotificationID == 'ASPv'));
72 }
73
74} // namespace AAX
75
76
77#endif // #ifndef _TMS320C6X
78
79#endif // #ifndef _AAX_UTILSNATIVE_H_
A generic AAX string class with similar functionality to std::string.
Various utility definitions for AAX.
const char * AAX_CParamID
Parameter identifier.
Definition: AAX.h:349
uint8_t AAX_CBoolean
Cross-compiler boolean type used by AAX interfaces.
Definition: AAX.h:326
uint32_t AAX_CTypeID
Matches type of OSType used in classic plugins.
Definition: AAX.h:333
An AAX string interface.
Declarations for cross-platform AAX_ASSERT, AAX_TRACE and related facilities.
Definition: AAX_EnvironmentUtilities.h:59
AAX_CBoolean IsAvidNotification(AAX_CTypeID inNotificationID)
Helper function to check if a notification ID is reserved for host notifications.
Definition: AAX_UtilsNative.h:67
float SafeLogf(float aValue)
Single-precision safe log function. Returns zero for input values that are <= 0.0.
Definition: AAX_UtilsNative.h:55
AAX_CBoolean IsParameterIDEqual(AAX_CParamID iParam1, AAX_CParamID iParam2)
Helper function to check if two parameter IDs are equivalent.
Definition: AAX_UtilsNative.h:59
double SafeLog(double aValue)
Double-precision safe log function. Returns zero for input values that are <= 0.0.
Definition: AAX_UtilsNative.h:50
AAX_CBoolean IsEffectIDEqual(const AAX_IString *iEffectID1, const AAX_IString *iEffectID2)
Helper function to check if two Effect IDs are equivalent.
Definition: AAX_UtilsNative.h:63
A simple string container that can be passed across a binary boundary. This class,...
Definition: AAX_IString.h:38
virtual const char * Get() const =0