| AAX SDK 2.6.1 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- File List
- File Members

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
40 template <typename T>
41 class AAX_CBinaryTaperDelegate : public AAX_ITaperDelegate<T>
42{
43 public:
44
48 AAX_CBinaryTaperDelegate( );
49
50 //Virtual Overrides
51 AAX_ITaperDelegate<T>* Clone() const AAX_OVERRIDE;
52 T GetMaximumValue() const AAX_OVERRIDE;
53 T GetMinimumValue() const AAX_OVERRIDE;
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
64 template <typename T>
65 AAX_CBinaryTaperDelegate<T>::AAX_CBinaryTaperDelegate( ) :
66 AAX_ITaperDelegate<T>()
67{
68}
69
70 template <typename T>
71 AAX_ITaperDelegate<T>* AAX_CBinaryTaperDelegate<T>::Clone() const
72{
73 return new AAX_CBinaryTaperDelegate(*this);
74}
75
76 template <typename T>
77T AAX_CBinaryTaperDelegate<T>::GetMinimumValue() const
78{
79 return false;
80}
81
82 template <typename T>
83T AAX_CBinaryTaperDelegate<T>::GetMaximumValue() const
84{
85 return true;
86}
87
88 template <typename T>
89T AAX_CBinaryTaperDelegate<T>::ConstrainRealValue(T value) const
90{
91 return value;
92}
93
94 template <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
102 template <typename T>
103 double AAX_CBinaryTaperDelegate<T>::RealToNormalized(T realValue) const
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
AAX_ITaperDelegate.h
Defines the taper conversion behavior for a parameter.
AAX_OVERRIDE
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:151
AAX_CBinaryTaperDelegate
A binary taper conforming to AAX_ITaperDelegate.
Definition: AAX_CBinaryTaperDelegate.h:42
AAX_CBinaryTaperDelegate::GetMaximumValue
T GetMaximumValue() const AAX_OVERRIDE
Returns the taper's maximum real value.
Definition: AAX_CBinaryTaperDelegate.h:83
AAX_CBinaryTaperDelegate::Clone
AAX_ITaperDelegate< T > * Clone() const AAX_OVERRIDE
Constructs and returns a copy of the taper delegate.
Definition: AAX_CBinaryTaperDelegate.h:71
AAX_CBinaryTaperDelegate::ConstrainRealValue
T ConstrainRealValue(T value) const AAX_OVERRIDE
Applies a contraint to the value and returns the constrained value.
Definition: AAX_CBinaryTaperDelegate.h:89
AAX_CBinaryTaperDelegate::RealToNormalized
double RealToNormalized(T realValue) const AAX_OVERRIDE
Normalizes a real parameter value.
Definition: AAX_CBinaryTaperDelegate.h:103
AAX_CBinaryTaperDelegate::AAX_CBinaryTaperDelegate
AAX_CBinaryTaperDelegate()
Constructs a Binary Taper.
Definition: AAX_CBinaryTaperDelegate.h:65
AAX_CBinaryTaperDelegate::NormalizedToReal
T NormalizedToReal(double normalizedValue) const AAX_OVERRIDE
Converts a normalized value to a real value.
Definition: AAX_CBinaryTaperDelegate.h:95
AAX_CBinaryTaperDelegate::GetMinimumValue
T GetMinimumValue() const AAX_OVERRIDE
Returns the taper's minimum real value.
Definition: AAX_CBinaryTaperDelegate.h:77
AAX_ITaperDelegate
Definition: AAX_ITaperDelegate.h:86