1
$\begingroup$

I'm working on a realtime FFT processing algorithm in C using PortAudio. Currently I'm just trying to test if I can do OLA / OLS in (semi) real time using FFTW. I'm getting some distortion in the output when applying 2x sin and cos windows on the real signal before and after FFTW using the trig identity sin^2+cos^2=1. This should be an identity system but there is some added distortion on the output. I'm only using powers of 2 for the transform currently. Any ideas on why this distortion is occurring?

Regards, Eric

$\endgroup$
  • 1
    $\begingroup$ My idea is that there's a bug somewhere. But now seriously, how should we be able to tell? If you described exactly what you did then we could try to help you find the problem. Please don't just paste the code because this is no code review forum. $\endgroup$ – Matt L. Apr 7 '15 at 6:54
  • $\begingroup$ First I read in the stereo signals using PortAudio. $\endgroup$ – Eric Zhang Apr 13 '15 at 19:19
  • $\begingroup$ After allocating complex arrays and declaring plans for FFTW, I read in the WAV audio (2 stereo or mono files) using PortAudio into double precision buffers. Then I window the input. After creating forward plans, I execute the plans, then create and execute the inverse plans. Then I window again, and overlap-add and scale the output. The current buffers are saved for the next callback using global pointers, for overlap save. $\endgroup$ – Eric Zhang Apr 13 '15 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.