AAX SDK 2.6.1
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 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#ifndef AAX_CBINARYTAPERDELEGATE_H
23#define AAX_CBINARYTAPERDELEGATE_H
24
25#include "AAX_ITaperDelegate.h"
26
27
40template <typename T>
42{
43public:
44
49
50 //Virtual Overrides
54 T ConstrainRealValue(T value) const AAX_OVERRIDE;
55 T NormalizedToReal(double normalizedValue) const AAX_OVERRIDE;
56 double RealToNormalized(T realValue) const AAX_OVERRIDE;
57};
58
59
60
61
62
63
64template <typename T>
67{
68}
69
70template <typename T>
72{
73 return new AAX_CBinaryTaperDelegate(*this);
74}
75
76template <typename T>
78{
79 return false;
80}
81
82template <typename T>
84{
85 return true;
86}
87
88template <typename T>
90{
91 return value;
92}
93
94template <typename T>
95T AAX_CBinaryTaperDelegate<T>::NormalizedToReal(double normalizedValue) const
96{
97 if (normalizedValue > 0.0f)
98 return (T)(1); //should construct true for bool
99 return (T)(0); //should construct false for bool
100}
101
102template <typename T>
104{
105 if (realValue > (T)(0))
106 return 1.0f;
107 return 0.0f;
108}
109
110
111
112
113#endif //AAX_CBINARYTAPERDELEGATE_H
114
115
Defines the taper conversion behavior for a parameter.
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:151
A binary taper conforming to AAX_ITaperDelegate.
Definition: AAX_CBinaryTaperDelegate.h:42
T GetMaximumValue() const AAX_OVERRIDE
Returns the taper's maximum real value.
Definition: AAX_CBinaryTaperDelegate.h:83
AAX_ITaperDelegate< T > * Clone() const AAX_OVERRIDE
Constructs and returns a copy of the taper delegate.
Definition: AAX_CBinaryTaperDelegate.h:71
T ConstrainRealValue(T value) const AAX_OVERRIDE
Applies a contraint to the value and returns the constrained value.
Definition: AAX_CBinaryTaperDelegate.h:89
double RealToNormalized(T realValue) const AAX_OVERRIDE
Normalizes a real parameter value.
Definition: AAX_CBinaryTaperDelegate.h:103
AAX_CBinaryTaperDelegate()
Constructs a Binary Taper.
Definition: AAX_CBinaryTaperDelegate.h:65
T NormalizedToReal(double normalizedValue) const AAX_OVERRIDE
Converts a normalized value to a real value.
Definition: AAX_CBinaryTaperDelegate.h:95
T GetMinimumValue() const AAX_OVERRIDE
Returns the taper's minimum real value.
Definition: AAX_CBinaryTaperDelegate.h:77
Definition: AAX_ITaperDelegate.h:86