Function

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

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

Declaration

func vDSP_vdbcon(_ __A: UnsafePointer<Float>, _ __IA: vDSP_Stride, _ __B: UnsafePointer<Float>, _ __C: UnsafeMutablePointer<Float>, _ __IC: vDSP_Stride, _ __N: vDSP_Length, _ __F: UInt32)

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.

mathematical formula

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.

See Also

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.