Contents

convert(power:toDecibels:zeroReference:)

Converts single-precision power values to decibel values.

Declaration

static func convert<U, V>(power: U, toDecibels decibels: inout V, zeroReference: Float) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float

Parameters

  • power:

    The input vector that defines the power values.

  • decibels:

    The output vector that contains the decibel values.

  • zeroReference:

    The zero reference that the function uses for the conversion.

Discussion

The function uses the following calculation to perform the conversion:

alpha = 10;

for (n = 0; n < N; ++n)
    C[n] = alpha * log10(A[n] / B[0]);

See Also

Converting single-precision power or amplitude values to decibel values