AAX SDK 2.8.0
Avid Audio Extensions Development Kit
Loading...
Searching...
No Matches
AAX_CBinaryTaperDelegate.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3 *
4 * Copyright 2014-2017, 2019, 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#ifndef AAX_CBINARYTAPERDELEGATE_H
36#define AAX_CBINARYTAPERDELEGATE_H
37
38#include "AAX_ITaperDelegate.h"
39
40
53template <typename T>
55{
56public:
57
62
63 //Virtual Overrides
67 T ConstrainRealValue(T value) const AAX_OVERRIDE;
68 T NormalizedToReal(double normalizedValue) const AAX_OVERRIDE;
69 double RealToNormalized(T realValue) const AAX_OVERRIDE;
70};
71
72
73
74
75
76
77template <typename T>
80{
81}
82
83template <typename T>
85{
86 return new AAX_CBinaryTaperDelegate(*this);
87}
88
89template <typename T>
91{
92 return false;
93}
94
95template <typename T>
97{
98 return true;
99}
100
101template <typename T>
103{
104 return value;
105}
106
107template <typename T>
109{
110 if (normalizedValue > 0.0f)
111 return (T)(1); //should construct true for bool
112 return (T)(0); //should construct false for bool
113}
114
115template <typename T>
117{
118 if (realValue > (T)(0))
119 return 1.0f;
120 return 0.0f;
121}
122
123
124
125
126#endif //AAX_CBINARYTAPERDELEGATE_H
127
128
Defines the taper conversion behavior for a parameter.
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:164
A binary taper conforming to AAX_ITaperDelegate.
Definition: AAX_CBinaryTaperDelegate.h:55
T GetMaximumValue() const AAX_OVERRIDE
Returns the taper's maximum real value.
Definition: AAX_CBinaryTaperDelegate.h:96
AAX_ITaperDelegate< T > * Clone() const AAX_OVERRIDE
Constructs and returns a copy of the taper delegate.
Definition: AAX_CBinaryTaperDelegate.h:84
T ConstrainRealValue(T value) const AAX_OVERRIDE
Applies a contraint to the value and returns the constrained value.
Definition: AAX_CBinaryTaperDelegate.h:102
double RealToNormalized(T realValue) const AAX_OVERRIDE
Normalizes a real parameter value.
Definition: AAX_CBinaryTaperDelegate.h:116
AAX_CBinaryTaperDelegate()
Constructs a Binary Taper.
Definition: AAX_CBinaryTaperDelegate.h:78
T NormalizedToReal(double normalizedValue) const AAX_OVERRIDE
Converts a normalized value to a real value.
Definition: AAX_CBinaryTaperDelegate.h:108
T GetMinimumValue() const AAX_OVERRIDE
Returns the taper's minimum real value.
Definition: AAX_CBinaryTaperDelegate.h:90
Definition: AAX_ITaperDelegate.h:99