开发者

What are Window's FFT functions?

开发者 https://www.devze.com 2023-04-11 22:04 出处:网络
I\'m writing a Win32 application, using just C++ and WinApi calls. I need to run an 8192-point FFT over 20ms of WAVEFORMATEX data. What would be the most e开发者_如何学Cfficient method of accomplishin

I'm writing a Win32 application, using just C++ and WinApi calls. I need to run an 8192-point FFT over 20ms of WAVEFORMATEX data. What would be the most e开发者_如何学Cfficient method of accomplishing this?


It's been a long time, but I recall this code library as being very fast and easy to compile:

http://fftw.org/


As we fleshed out in the comments, the MSDN Documentation for XDSP functions may be of relevance to you.

The functions don't appear to take WAVEFORMATEX directly, but if you can convert it to the appropriate format you can use FFT to do what you want.

Note that it's part of the DirectX SDK, so you're introducing a new dependency.


KISSFFT is not a windows api, per se. However it is small enough to embed nicely in any project -- about 30kb of ANSI C sourcecode for the basic complex-to-complex transform. Unlike other super-tiny FFT libraries, it is fast, featureful, accurate, and can be used in a multi-threaded program.

One of the key features is that KISSFFT can do mixed radix (multiples of 2,3,5 are fastest). Other "bolt-on" features are available in the tools directory. Use only the pieces you need for: multi-dimensional transforms, real-optimized transforms (i.e. half spectrum), fast convolution, etc

The speed is generally fast enough for most applications -- not quite as fast as fftw or vendor libraries, but faster than the builk of the remainder.

KISSFFT's accuracy is as good as any FFT library out there.

The license is 3 clause BSD which can legally be used inside a commercial app at one end of the spectrum or a GPL app at the other end. It just requires a simple attribution in the docs.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号