Chris
Chris

Reputation: 347

Fourier Transform on Android

Are there any Android's API's, that implement the Fourier Transform using the device's DSP? Or are there any API's that permit using the device's DSP?

Thanks.

Upvotes: 3

Views: 6128

Answers (4)

digiphd
digiphd

Reputation: 2337

Sorry this is a bit late, but if you want to calculate the Fourier transform in Android for a real or complex number you are better off using either jTransfrom or libgdx.FFT. libgdx uses KissFFT backend, not quite sure what jTransform uses.

Check out this example on how to implement libgdx:

http://www.digiphd.com/android-java-simple-fft-libgdx/

Hope this helps.

Upvotes: 2

Joel F
Joel F

Reputation: 2631

Firstly, not all devices have a DSP. Most in fact just have a CPU and GPU.

As of today, you probably can't really do what you want without a custom ROM/firmware. The good news is that they are working on it. Look at Renderscript which is available starting with Honeycomb. It currently only runs on CPUs (though it can use multiple cores), but the plan is for a future release to allow execution on the GPU (and maybe DSP) as well, with little-to-no code changes on your part. See this post for more info.

Upvotes: 1

olivierg
olivierg

Reputation: 10240

No, there is no public API for performing hardware accelerated FFT.

You can optimize native code by targeting the armeabi-v7a ABI in order to use the FPU. That's very useful for floating point FFT.

See CPU-ARCH-ABIS in the docs/ directory of the Android NDK.

Upvotes: 3

Konstantin Pribluda
Konstantin Pribluda

Reputation: 12367

Visualiyer is said to be able to export FFT from audio playing :

http://developer.android.com/reference/android/media/audiofx/Visualizer.html

but it is certainly not that what you like.

Upvotes: 0

Related Questions