(8.D.2.7) Db10Approx
Overview
Converts from energy to decibels using a fast approximation
Discussion
Converts from energy to decibels using a fast polynomial approximation The function uses a 3rd order polynomial and the maximum error over the entire input range is 1.4e-5 dB.
Type Definition
typedef struct _ModuleDb10Approx
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
} ModuleDb10ApproxClass;
Pins
Input Pins
Name: in
Description: Input signal
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Output signal
Data type: float
MATLAB Usage
File Name: db10_approx_module.m
M=db10_approx_module(NAME)
Creates an Audio Weaver module that computes the function 10*log10(x)
using a polynomial approximation. This converts from energy to decibels.
NAME - name of the module.
Â