[LAD] Jack buffer management for block convolution

Damien Zammit damien.zammit at gmail.com
Mon Jun 14 04:17:30 UTC 2010


>> I have written a FFTW based block convolution jack client, but I am
>> having difficulty processing the last jackframes%L samples of the jack
>> buffer.  I have read that it might be an idea to collect the samples
>
> What do you mean by "the last jackframes%L samples" ??

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).

My question is, how do I handle the final sub-block of convolution of each
jack buffer, as it will not be of length L, but of length (FRAMES mod L)
where FRAMES is the length of the jack buffer.

+-------+-------+-------+-------+----+
|       |       |       |       |    |
+-------+-------+-------+-------+----+
0       L       2L      3L      4L   FRAMES


--
Damien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20100614/7651a7dd/attachment.html>


More information about the Linux-audio-dev mailing list