common code: Make preemphasis 0 dB @ 1000 Hz

pull/1/head
Andreas Eversberg 7 years ago
parent 16acdbf59d
commit 0c99848120
  1. 6
      src/common/emphasis.c
  2. 2
      src/test/test_emphasis.c

@ -35,11 +35,11 @@ int init_emphasis(emphasis_t *state, int samplerate)
return -1;
}
factor = 0.95;
factor = 0.97;
state->p.factor = factor;
state->p.amp = samplerate / 48000.0 * 4.0; /* mysterious 48000 */
state->p.amp = samplerate / 6350.0;
state->d.factor = factor;
state->d.amp = 1.0 / (samplerate / 48000.0 * 4.0); /* mysterious 48000 */
state->d.amp = 1.0 / (samplerate / 6350.0);
return 0;
}

@ -52,6 +52,8 @@ int main(void)
emphasis_t estate;
int16_t samples[SAMPLERATE];
printf("1000 Hz shall be close to 0 dB, that is no significant change in volume.\n\n");
/* generate sweep 0..4khz */
gen_samples(samples);

Loading…
Cancel
Save