Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate code in recalculateCoefficients #38

Open
ghost opened this issue Jun 9, 2018 · 0 comments
Open

Duplicate code in recalculateCoefficients #38

ghost opened this issue Jun 9, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 9, 2018

Fwiw, this code...

if (type === DSP.PEAKING_EQ || type === DSP.LOW_SHELF || type === DSP.HIGH_SHELF ) {
A = Math.pow(10, (this.dBgain/40)); // for peaking and shelving EQ filters only
} else {
A = Math.sqrt( Math.pow(10, (this.dBgain/20)) );

can probably be replaced with...

A = Math.sqrt( Math.pow(10, (this.dBgain/20)) );

@ghost ghost changed the title Needless code in recalculateCoefficients Duplicated code in recalculateCoefficients Jun 9, 2018
@ghost ghost changed the title Duplicated code in recalculateCoefficients Duplicate code in recalculateCoefficients Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants