|
|
|
|
|
by ldarby
2098 days ago
|
|
> clip without blowing out your meters If the audio clips, and the meter doesn't "blow out", then in my opinion that is a defective meter. ALSA already has an eq plugin (http://quitte.de/dsp/caps.html#Eq10) and I added this to it: if ((s > +0.99 && x[z1] > +0.99 && x[z2] > +0.99) ||
(s < -0.99 && x[z1] < -0.99 && x[z2] < -0.99) ) {
//clipped audio isn't exactly 1.
printf ("dsp/Eq.h:process(): input clipped :(\n");
}
.... if (
(r >= 1.0 || r <= -1.0) &&
(r < 20 && r > -20)) { //uninited memory?
printf ("dsp/Eq.h:process(): output clipped :( %0.16f\n", r);
}
(one day I should try to get upstream to accept that or something like it...) |
|