Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About implementation in swift #66

Open
muga87 opened this issue Jul 6, 2021 · 0 comments
Open

About implementation in swift #66

muga87 opened this issue Jul 6, 2021 · 0 comments

Comments

@muga87
Copy link

muga87 commented Jul 6, 2021

Hi there, I need to calculate fft in my iOS project using byte array which from sound record. I can able to integrate kissfft in my project. As per documentation to calculate fft, I have used like this.

for init 
let kissFT = kiss_fft_alloc(Int32(sampleRate), 0, nil,nil)
for calculating cpx_in and cpx_out I have tried like this, but I could not ale to find the method
 let cpx_in = kiss_fft_cpx(r: <#T##Float#>, i: <#T##Float#>)

Here I have to pass ‘r’ and ‘i’ values. But I am not understanding what values I have to pass. Can you please help me.

Where in android I am using like this using DoubleFFt_1D java class.

DoubleFFT_1D fft_1d = new DoubleFFT_1D(windowSize);
double[] rowFFT = new double[2 * windowSize];
 
for (int win = 0; win < windowSize; win++)
{
rowFFT[win * 2] = sample[win + time * (windowSize - overlap)] * windowing[win];
rowFFT[win * 2 + 1] = 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant