| AAX SDK 2.8.0 Avid Audio Extensions Development Kit

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

- File List
- File Members

Loading...
Searching...
No Matches
Functions | Variables
AAX_CommonConversions.h File Reference
`#include <math.h>`
`#include "AAX.h"`

Go to the source code of this file.

## Functions
double | GainToDB (double aGain)
| Convert Gain to dB.
double | DBToGain (double dB)
| Convert dB to Gain.
double | LongToDouble (int32_t aLong)
| Convert Long to Double.
int32_t | DoubleToLong (double aDouble)
| convert floating point equivalent back to int32_t
int32_t | DoubleToDSPCoef (double d, double max=k56kFloatPosMax, double min=k56kFloatNegMax)
| Convert Double to DSPCoef.
double | DSPCoefToDouble (int32_t c, int32_t max=k56kFracPosMax, int32_t min=k56kFracNegMax)
| Convert DSPCoef to Double.
double | ThirtyTwoBitDSPCoefToDouble (int32_t c)
| ThirtyTwoBitDSPCoefToDouble.
int32_t | DoubleTo32BitDSPCoefRnd (double d)
| DoubleTo32BitDSPCoefRnd.
int32_t | DoubleTo32BitDSPCoef (double d)
int32_t | DoubleToDSPCoefRnd (double d, double max, double min)

## Variables
const int32_t | k32BitPosMax = 0x7FFFFFFF
const int32_t | k32BitAbsMax = 0x80000000
const int32_t | k32BitNegMax = 0x80000000
const int32_t | k56kFracPosMax = 0x007FFFFF
const int32_t | k56kFracAbsMax = 0x00800000
const int32_t | k56kFracHalf = 0x00400000
const int32_t | k56kFracNegOne = 0xFF800000
const int32_t | k56kFracNegMax = k56kFracNegOne
const int32_t | k56kFracZero = 0x00000000
const double | kOneOver56kFracAbsMax = 1.0/double(k56kFracAbsMax)
const double | k56kFloatPosMax = double(k56kFracPosMax)/double(k56kFracAbsMax)
const double | k56kFloatNegMax = -1.0
const double | kNeg144DB = -144.0
const double | kNeg144Gain = 6.3095734448019324943436013662234e-8

## Function Documentation

## ◆ GainToDB()

double GainToDB | ( | double | aGain | ) |
| inline

Convert Gain to dB.

Todo:
  This should be incorporated into parameters' tapers and not called separately

References kNeg144DB.

## ◆ DBToGain()

double DBToGain | ( | double | dB | ) |
| inline

Convert dB to Gain.

Todo:
  This should be incorporated into parameters' tapers and not called separately

## ◆ LongToDouble()

double LongToDouble | ( | int32_t | aLong | ) |
| inline

Convert Long to Double.

LongToDouble: convert 24 bit fixed point in a int32_t to floating point equivalent

References k56kFracNegMax, k56kFracPosMax, and kOneOver56kFracAbsMax.

## ◆ DoubleToLong()

int32_t DoubleToLong | ( | double | aDouble | ) |

convert floating point equivalent back to int32_t

## ◆ DoubleToDSPCoef()

int32_t DoubleToDSPCoef | ( | double | d,
|  | double | max = `k56kFloatPosMax`,
|  | double | min = `k56kFloatNegMax`
| ) |  |
| inline

Convert Double to DSPCoef.

References k56kFracAbsMax, k56kFracNegMax, and k56kFracPosMax.

Referenced by DoubleTo32BitDSPCoefRnd().

Here is the caller graph for this function:

## ◆ DSPCoefToDouble()

double DSPCoefToDouble | ( | int32_t | c,
|  | int32_t | max = `k56kFracPosMax`,
|  | int32_t | min = `k56kFracNegMax`
| ) |  |
| inline

Convert DSPCoef to Double.

References k56kFracNegMax, k56kFracPosMax, and kOneOver56kFracAbsMax.

Referenced by ThirtyTwoBitDSPCoefToDouble().

Here is the caller graph for this function:

## ◆ ThirtyTwoBitDSPCoefToDouble()

double ThirtyTwoBitDSPCoefToDouble | ( | int32_t | c | ) |
| inline

ThirtyTwoBitDSPCoefToDouble.

References DSPCoefToDouble(), k32BitNegMax, and k32BitPosMax.

Here is the call graph for this function:

## ◆ DoubleTo32BitDSPCoefRnd()

int32_t DoubleTo32BitDSPCoefRnd | ( | double | d | ) |
| inline

DoubleTo32BitDSPCoefRnd.

References DoubleToDSPCoef(), k32BitNegMax, and k32BitPosMax.

Here is the call graph for this function:

## ◆ DoubleTo32BitDSPCoef()

int32_t DoubleTo32BitDSPCoef | ( | double | d | ) |

## ◆ DoubleToDSPCoefRnd()

int32_t DoubleToDSPCoefRnd | ( | double | d,
|  | double | max,
|  | double | min
| ) |  |

## Variable Documentation

## ◆ k32BitPosMax

const int32_t k32BitPosMax = 0x7FFFFFFF

Referenced by DoubleTo32BitDSPCoefRnd(), and ThirtyTwoBitDSPCoefToDouble().

## ◆ k32BitAbsMax

const int32_t k32BitAbsMax = 0x80000000

## ◆ k32BitNegMax

const int32_t k32BitNegMax = 0x80000000

Referenced by DoubleTo32BitDSPCoefRnd(), and ThirtyTwoBitDSPCoefToDouble().

## ◆ k56kFracPosMax

const int32_t k56kFracPosMax = 0x007FFFFF

Referenced by DoubleToDSPCoef(), DSPCoefToDouble(), and LongToDouble().

## ◆ k56kFracAbsMax

const int32_t k56kFracAbsMax = 0x00800000

Referenced by DoubleToDSPCoef().

## ◆ k56kFracHalf

const int32_t k56kFracHalf = 0x00400000

## ◆ k56kFracNegOne

const int32_t k56kFracNegOne = 0xFF800000

## ◆ k56kFracNegMax

const int32_t k56kFracNegMax = k56kFracNegOne

Referenced by DoubleToDSPCoef(), DSPCoefToDouble(), and LongToDouble().

## ◆ k56kFracZero

const int32_t k56kFracZero = 0x00000000

## ◆ kOneOver56kFracAbsMax

const double kOneOver56kFracAbsMax = 1.0/double(k56kFracAbsMax)

Referenced by DSPCoefToDouble(), and LongToDouble().

## ◆ k56kFloatPosMax

const double k56kFloatPosMax = double(k56kFracPosMax)/double(k56kFracAbsMax)

## ◆ k56kFloatNegMax

const double k56kFloatNegMax = -1.0

## ◆ kNeg144DB

const double kNeg144DB = -144.0

Referenced by GainToDB().

## ◆ kNeg144Gain

const double kNeg144Gain = 6.3095734448019324943436013662234e-8