AAX SDK 2.8.0
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-2024 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * This file is part of the Avid AAX SDK.
8 *
9 * The AAX SDK is subject to commercial or open-source licensing.
10 *
11 * By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
12 * Agreement and Avid Privacy Policy.
13 *
14 * AAX SDK License: https://developer.avid.com/aax
15 * Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
16 *
17 * Or: You may also use this code under the terms of the GPL v3 (see
18 * www.gnu.org/licenses).
19 *
20 * THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 * EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 * DISCLAIMED.
23 *
24 */
25
32/*================================================================================================*/
33
34
35#pragma once
36
37#ifndef _AAX_UTILSNATIVE_H_
38#define _AAX_UTILSNATIVE_H_
39
40
41#ifndef _TMS320C6X
42
43// AAX Includes
44#include "AAX_CString.h"
45#include "AAX_IString.h"
46#include "AAX_Assert.h"
47#include "AAX.h"
48
49// Standard Library Includes
50#include <cmath> // for log()
51#include <string.h>
52
53
54//------------------------------------------------
55#pragma mark Utility functions
56
57namespace AAX
58{
59
63 inline double SafeLog (double aValue) { return aValue <= 0.0 ? 0.0 : log(aValue); }
64
68 inline float SafeLogf (float aValue) { return aValue <= 0.0f ? 0.0f : logf(aValue); }
69
72 inline AAX_CBoolean IsParameterIDEqual ( AAX_CParamID iParam1, AAX_CParamID iParam2 ) { return static_cast<AAX_CBoolean>( strcmp ( iParam1, iParam2 ) == 0 ); }
73
76 inline AAX_CBoolean IsEffectIDEqual ( const AAX_IString * iEffectID1, const AAX_IString * iEffectID2 ) { return static_cast<AAX_CBoolean>( strcmp ( iEffectID1->Get(), iEffectID2->Get() ) == 0 ); }
77
80 inline AAX_CBoolean IsAvidNotification ( AAX_CTypeID inNotificationID )
81 {
82 return (AAX_CBoolean)((('A' == ((inNotificationID & 0xFF000000) >> 24)) &&
83 ('X' == ((inNotificationID & 0x00FF0000) >> 16))) ||
84 (inNotificationID == 'ASPv'));
85 }
86
87} // namespace AAX
88
89
90#endif // #ifndef _TMS320C6X
91
92#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:362
uint8_t AAX_CBoolean
Cross-compiler boolean type used by AAX interfaces.
Definition: AAX.h:339
uint32_t AAX_CTypeID
Matches type of OSType used in classic plugins.
Definition: AAX.h:346
An AAX string interface.
Declarations for cross-platform AAX_ASSERT, AAX_TRACE and related facilities.
Definition: AAX_EnvironmentUtilities.h:72
AAX_CBoolean IsAvidNotification(AAX_CTypeID inNotificationID)
Helper function to check if a notification ID is reserved for host notifications.
Definition: AAX_UtilsNative.h:80
float SafeLogf(float aValue)
Single-precision safe log function. Returns zero for input values that are <= 0.0.
Definition: AAX_UtilsNative.h:68
AAX_CBoolean IsParameterIDEqual(AAX_CParamID iParam1, AAX_CParamID iParam2)
Helper function to check if two parameter IDs are equivalent.
Definition: AAX_UtilsNative.h:72
double SafeLog(double aValue)
Double-precision safe log function. Returns zero for input values that are <= 0.0.
Definition: AAX_UtilsNative.h:63
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:76
A simple string container that can be passed across a binary boundary. This class,...
Definition: AAX_IString.h:51
virtual const char * Get() const =0