2013/3/22 Justin Chudgar <justin at justinzane.com>: [replying to two mails at once] > So, since this discussion is a bit over my head, let me see if I understand. > The recommendation is to use a fixed 2nd order butterworth biquad. That is, > remove the lppoles-# option and just allow user selection of cutoff frequency? If we agree that only LR4 crossover (and not, say, LR2 or LR8) needs to be implemented, then yes. > If that is correct, I drop the RC filter function, and keep the existing coeffs > calculations and the existing biquad, removing the code to enable cascading. > Do I understand correctly? Not quite. To implement a proper LR4 crossover filter, you need to cascade two (yes, two, not a user-configurable amount) 2nd order Butterworth lowpass filters, and also cascade two 2nd order Butterworth highpass filters, and do that for each channel. You do need to make sure that each of the 4N filters has its own biquad_data. > I'd love some feedback about the "best" of these choices from a pulseaudio perspective: > - keep a huge buffer for history data > - disable rewind [how does one do that?] Already answered by Tanu: http://lists.freedesktop.org/archives/pulseaudio-discuss/2013-March/016573.html Since I want pulseaudio to be perfect, please use a circular buffer for history data. >> >> Also I don't think that bqdt initialization is correct. You are >> declaring the structure on-stack in pa__init() and then assigning the >> address of that on-stack structure to the fields of a long-living >> userdata object. > I'm learning C as I go, so what would you recommend? In plain C you would use malloc() and free(), but pulseaudio has pulseaudio-specific wrappers such as pa_xnew() and pa_xfree(). -- Alexander E. Patrakov