---
title: "amplitudeToDecibels(_:zeroReference:)"
framework: accelerate
role: symbol
role_heading: Type Method
path: "accelerate/vdsp/amplitudetodecibels(_:zeroreference:)-2cgik"
---

# amplitudeToDecibels(_:zeroReference:)

Returns double-precision amplitude values converted to decibel values.

## Declaration

```swift
static func amplitudeToDecibels<U>(_ amplitude: U, zeroReference: Double) -> [Double] where U : AccelerateBuffer, U.Element == Double
```

## Parameters

- `amplitude`: The input vector that defines the amplitude values.
- `zeroReference`: The zero reference that the function uses for the conversion.

## Discussion

Discussion The function uses the following calculation to perform the conversion: alpha = 20;

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

## See Also

### Converting double-precision power or amplitude values to decibel values

- [powerToDecibels(_:zeroReference:)](accelerate/vdsp/powertodecibels(_:zeroreference:)-4b0qz.md)
- [convert(amplitude:toDecibels:zeroReference:)](accelerate/vdsp/convert(amplitude:todecibels:zeroreference:)-4io4p.md)
- [convert(power:toDecibels:zeroReference:)](accelerate/vdsp/convert(power:todecibels:zeroreference:)-3aiv4.md)
