| AAX SDK 2.8.0 Avid Audio Extensions Development Kit

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

- File List
- File Members

Loading...
Searching...
No Matches
AAX_Constants.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3 * Copyright 2009-2015, 2023-2024 Avid Technology, Inc.
4 * All rights reserved.
5 *
6 * This file is part of the Avid AAX SDK.
7 *
8 * The AAX SDK is subject to commercial or open-source licensing.
9 *
10 * By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
11 * Agreement and Avid Privacy Policy.
12 *
13 * AAX SDK License: https://developer.avid.com/aax
14 * Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
15 *
16 * Or: You may also use this code under the terms of the GPL v3 (see
17 * www.gnu.org/licenses).
18 *
19 * THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 * EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 * DISCLAIMED.
22 */
23
30/*================================================================================================*/
31#pragma once
32
33#ifndef AAX_CONSTANTS_H
34#define AAX_CONSTANTS_H
35
36
37/* the following lines were re-introduced on 6/11/09 because
38 the FFmt project still uses SInt32 types */
39#ifdef _TMS320C6X
40 typedef signed int SInt32;
41#else
42// #include "DigiPublicTypes.h"
43#endif
44/* end 6/11/09 changes */
45
46
47// Standard headers
48#include <cmath>
49
50 namespace AAX
51{
52
53#if __BIG_ENDIAN__
54 const int cBigEndian=1;
55 const int cLittleEndian=0;
56#else
57 const int cBigEndian=0;
58 const int cLittleEndian=1;
59#endif
60
61 const double cPi = 3.1415926535897932384626433832795;
62 const double cTwoPi = 6.2831853071795862319959269370884; //2.0*3.1415926535897932384626433832795;
63 const double cHalfPi = 1.5707963267948965579989817342721; //0.5*3.1415926535897932384626433832795;
64 const double cQuarterPi = 0.78539816339744827899949086713605; //0.25*3.1415926535897932384626433832795;
65 const double cRootTwo = 1.4142135623730950488016887242097;
66 const double cOneOverRootTwo= 0.70710678118654752440084436210485;
67
68
69//Obviously these numbers are are not exact.
70 const double cPos3dB=1.4142135623730950488016887242097;
71 const double cNeg3dB=0.70710678118654752440084436210485;
72 const double cPos6dB=2.0;
73 const double cNeg6dB=0.5;
74
75 const double cNormalizeLongToAmplitudeOneHalf = 0.00000000023283064365386962890625; //1.0/double(1LL<<32LL);
76 const double cNormalizeLongToAmplitudeOne = 1.0/double(1<<31); //-0.0000000004656612873077392578125;
77
78 const double cMilli=0.001;
79 const double cMicro=0.001*0.001;
80 const double cNano=0.001*0.001*0.001;
81 const double cPico=0.001*0.001*0.001*0.001;
82
83 const double cKilo=1000.0;
84 const double cMega=1000.0*1000.0;
85 const double cGiga=1000.0*1000.0*1000.0;
86
87 enum ESampleRates
88{
89 e44100SampleRate = 44100,
90 e48000SampleRate = 48000,
91 e88200SampleRate = 88200,
92 e96000SampleRate = 96000,
93 e176400SampleRate = 176400,
94 e192000SampleRate = 192000
95};
96
97} // namespace AAX
98
99#endif // AAX_CONSTANTS_H
100
AAX
Definition: AAX_EnvironmentUtilities.h:72
AAX::cOneOverRootTwo
const double cOneOverRootTwo
Definition: AAX_Constants.h:66
AAX::cTwoPi
const double cTwoPi
Definition: AAX_Constants.h:62
AAX::cMilli
const double cMilli
Definition: AAX_Constants.h:78
AAX::cNano
const double cNano
Definition: AAX_Constants.h:80
AAX::cPico
const double cPico
Definition: AAX_Constants.h:81
AAX::cHalfPi
const double cHalfPi
Definition: AAX_Constants.h:63
AAX::ESampleRates
ESampleRates
Definition: AAX_Constants.h:88
AAX::e44100SampleRate
@ e44100SampleRate
Definition: AAX_Constants.h:89
AAX::e96000SampleRate
@ e96000SampleRate
Definition: AAX_Constants.h:92
AAX::e176400SampleRate
@ e176400SampleRate
Definition: AAX_Constants.h:93
AAX::e88200SampleRate
@ e88200SampleRate
Definition: AAX_Constants.h:91
AAX::e192000SampleRate
@ e192000SampleRate
Definition: AAX_Constants.h:94
AAX::e48000SampleRate
@ e48000SampleRate
Definition: AAX_Constants.h:90
AAX::cMicro
const double cMicro
Definition: AAX_Constants.h:79
AAX::cPi
const double cPi
Definition: AAX_Constants.h:61
AAX::cNormalizeLongToAmplitudeOneHalf
const double cNormalizeLongToAmplitudeOneHalf
Definition: AAX_Constants.h:75
AAX::cKilo
const double cKilo
Definition: AAX_Constants.h:83
AAX::cPos6dB
const double cPos6dB
Definition: AAX_Constants.h:72
AAX::cNeg6dB
const double cNeg6dB
Definition: AAX_Constants.h:73
AAX::cMega
const double cMega
Definition: AAX_Constants.h:84
AAX::cPos3dB
const double cPos3dB
Definition: AAX_Constants.h:70
AAX::cNormalizeLongToAmplitudeOne
const double cNormalizeLongToAmplitudeOne
Definition: AAX_Constants.h:76
AAX::cQuarterPi
const double cQuarterPi
Definition: AAX_Constants.h:64
AAX::cGiga
const double cGiga
Definition: AAX_Constants.h:85
AAX::cBigEndian
const int cBigEndian
Definition: AAX_Constants.h:57
AAX::cRootTwo
const double cRootTwo
Definition: AAX_Constants.h:65
AAX::cNeg3dB
const double cNeg3dB
Definition: AAX_Constants.h:71
AAX::cLittleEndian
const int cLittleEndian
Definition: AAX_Constants.h:58