我应该从getFft看到什么样的输出

我应该从getFft看到什么样的输出

本文介绍了我应该从getFft看到什么样的输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我正在开发一个Android音频可视化应用程序。问题是,我得到形式的方法getFft()没有jive与谷歌说,它应该产生。我跟踪源代码一路回到C ++,但我不熟悉C ++或FFT才能真正了解发生了什么。

Alright, so I am working on creating an Android audio visualization app. The problem is, what I get form the method getFft() doesn't jive with what google says it should produce. I traced the source code all the way back to C++, but I am not familiar enough with C++ or FFT to actually understand what is happening.

我会尝试包括一切需要此处:

I will try and include everything needed here:

UPDATE

猜猜(在看代码之后),我会说实际组件是偶数索引,奇数组件是奇数索引。所以要获得量值,你需要做如下:

If I had to guess (after glancing at the code), I'd say that real components were at even indices, and odd components were at odd indices. So to get magnitudes, you'd need to do something like:

uint32_t mag[N/2];
for (int i = 0; i < N/2; i++)
{
    mag[i] = fft[2*i]*fft[2*i] + fft[2*i+1]*fft[2*i+1];
}

这篇关于我应该从getFft看到什么样的输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!