mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
biquad: Fix warning, gamma shadows global declaration
pulsecore/filter/biquad.c: In function 'biquad_lowpass': pulsecore/filter/biquad.c:52:10: warning: declaration of 'gamma' shadows a global declaration [-Wshadow] pulsecore/filter/biquad.c: In function 'biquad_highpass': pulsecore/filter/biquad.c:86:10: warning: declaration of 'gamma' shadows a global declaration [-Wshadow] Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
parent
815c67f8d7
commit
a26defed9e
1 changed files with 6 additions and 6 deletions
|
|
@ -51,13 +51,13 @@ static void biquad_lowpass(struct biquad *bq, double cutoff)
|
|||
double theta = M_PI * cutoff;
|
||||
double sn = 0.5 * M_SQRT2 * sin(theta);
|
||||
double beta = 0.5 * (1 - sn) / (1 + sn);
|
||||
double gamma = (0.5 + beta) * cos(theta);
|
||||
double alpha = 0.25 * (0.5 + beta - gamma);
|
||||
double gamma_coeff = (0.5 + beta) * cos(theta);
|
||||
double alpha = 0.25 * (0.5 + beta - gamma_coeff);
|
||||
|
||||
double b0 = 2 * alpha;
|
||||
double b1 = 2 * 2 * alpha;
|
||||
double b2 = 2 * alpha;
|
||||
double a1 = 2 * -gamma;
|
||||
double a1 = 2 * -gamma_coeff;
|
||||
double a2 = 2 * beta;
|
||||
|
||||
set_coefficient(bq, b0, b1, b2, 1, a1, a2);
|
||||
|
|
@ -83,13 +83,13 @@ static void biquad_highpass(struct biquad *bq, double cutoff)
|
|||
double theta = M_PI * cutoff;
|
||||
double sn = 0.5 * M_SQRT2 * sin(theta);
|
||||
double beta = 0.5 * (1 - sn) / (1 + sn);
|
||||
double gamma = (0.5 + beta) * cos(theta);
|
||||
double alpha = 0.25 * (0.5 + beta + gamma);
|
||||
double gamma_coeff = (0.5 + beta) * cos(theta);
|
||||
double alpha = 0.25 * (0.5 + beta + gamma_coeff);
|
||||
|
||||
double b0 = 2 * alpha;
|
||||
double b1 = 2 * -2 * alpha;
|
||||
double b2 = 2 * alpha;
|
||||
double a1 = 2 * -gamma;
|
||||
double a1 = 2 * -gamma_coeff;
|
||||
double a2 = 2 * beta;
|
||||
|
||||
set_coefficient(bq, b0, b1, b2, 1, a1, a2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue