On Mon, Jun 14, 2010 at 02:17:30PM +1000, Damien Zammit wrote: > The algorithm I am using is the standard overlap-add method of block > convolution as defined in Oppenheim and Schafer 1989. Basically, I take a > FIR filter of length M taps, zero pad to N=L+M-1 where L is the length of my > sub-block of convolution. Also zero pad L inputs up to to N, then convolve > these N inputs with the zero padded filter. > The first M-1 outputs are added to the last M-1 outputs from the previous > block, and the output of the current block is truncated to L samples (from > N).
If the lenght of your filter is M, and the jack period is P, then in each process callback you have to compute the convolution of M filter taps and P samples. The result has M + P - 1 samples, no matter how it is done. The position of this block of M + P - 1 samples in the output stream advances by steps of P samples. You need an extra buffer to store and accumulate the part of each convolution that can't be output in the current cycle. Ciao, -- FA O tu, che porte, correndo si ? E guerra e morte ! _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/listinfo/linux-audio-dev
