[LAD] fftw3 issue with transform higher than 1024

Gabriel M. Beddingfield gabriel at teuton.org
Mon Jul 27 02:15:20 UTC 2009


On Sat, 25 Jul 2009, Justin Smith wrote:
>>
>> I am using the fftw3 library to implement a transform in a array of 5120
>> elements .
>> I have this array from a program that I created modifying the arecord
>> program.
[snip]
>
> I don't know fftw specifically, but I am fairly certain that you need
> a table size that is an even power of two for fft in general (maybe
> you can adjust your code to use 4096 or 8192?).

Ditto that.

If your data is 5120 samples... either truncate it to 4096 samples or pad 
it with zeros util you have 8192 samples.  (The zeros won't affect your 
transform.)

HTH,
Gabriel




More information about the Linux-audio-dev mailing list