Skip to content

How floor1_inverse_dB_table is calculated? #118

@lassade

Description

@lassade

Hi

I'm trying to calculate the floor1_inverse_dB_table, but I was unsuccessful, heres how I'm calculating it:

for (int i = 0; i < 256; i++) {
  floor1_inverse_dB_table[i] = pow(10.0, 0.05 * (140.0/256.0 * (i+1) - 140.0));
}

but this generates values that are slightly off from the values in the spec

1.0649856e-07, 1.1341944e-07, 1.2079008e-07, 1.2863970e-07 // generated from the code above
1.0649863e-07, 1.1341951e-07, 1.2079015e-07, 1.2863978e-07 // from spec

The difference is small, but I can't say why that is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions