Function

vDSP_vdbcon(_:_:_:_:_:_:_:)

Converts single-precision power or amplitude values to decibel values.

Parameters

__A

Single-precision real input vector

__IA

Stride for A

__B

Pointer to single-precision real input scalar: zero reference

__C

Single-precision real output vector

__IC

Stride for C

__N

The number of elements to process

__F

Power (0) or amplitude (1) flag

Discussion

Performs the following operation. α is 20 if F is 1, or 10 if F is 0.

Converts inputs from vector A to their decibel equivalents, calculated in terms of power or amplitude according to flag F. As a relative reference point, the value of input scalar *B is considered to be zero decibels.

Single-Vector Conversion to Decibel Equivalents

static func amplitudeToDecibels<U>(U, zeroReference: Double) -> [Double]

Returns double-precision amplitude values converted to decibel values.

static func amplitudeToDecibels<U>(U, zeroReference: Float) -> [Float]

Returns single-precision amplitude values converted to decibels.

static func powerToDecibels<U>(U, zeroReference: Double) -> [Double]

Returns double-precision power values converted to decibel values.

static func powerToDecibels<U>(U, zeroReference: Float) -> [Float]

Returns single-precision power values converted to decibel values.

static func convert<U, V>(amplitude: U, toDecibels: inout V, zeroReference: Double)

Converts double-precision amplitude values to decibel values.

static func convert<U, V>(amplitude: U, toDecibels: inout V, zeroReference: Float)

Converts single-precision amplitude values to decibel values.

static func convert<U, V>(power: U, toDecibels: inout V, zeroReference: Double)

Converts double-precision power values to decibel values.

static func convert<U, V>(power: U, toDecibels: inout V, zeroReference: Float)

Converts single-precision power values to decibel values.