Re: fft_zrip confusion
Re: fft_zrip confusion
- Subject: Re: fft_zrip confusion
- From: Austin Shoemaker <email@hidden>
- Date: Wed, 14 Apr 2004 10:58:33 -0700
ctoz takes your array of real floats and packs them into the complex
buffer. fft_zrip operates on the complex buffer to produce the FFT in
place. If you don't call ctoz every time before the fft_zrip, you will
be operating on the result of the last FFT, so you will get different
results each time. If you repeat the two lines you typed below each
time, you should get the same result every time. Are you calling ctoz
each time?
Regards,
Austin Shoemaker
On Apr 14, 2004, at 10:07 AM, Mark Woollard wrote:
I'm using this to do a forward fft on segments of a data stream. Sample
values are in the range -1 to 1. First time I call fft_zrip it works as
expected with a peak in the output data where I'd expect. But each
subsequent call the output values grow significantly, the input data
I've checked and is always within the described range. What am I
missing? Code segment:
// Apply fft
ctoz( (COMPLEX*) m_buffer, 2, &m_complex, 1, m_resultSize );
fft_zrip( m_weights, &m_complex, 1, m_log2f, FFT_FORWARD );
where m_buffer is an array of floats with the input data, m_complex a
COMPLEX_SPLIT with realp and imagp setup with buffers with enough space
for the results. I've checked the m_buffer contents by adding printf
loop and the input isn't getting ramped up. m_log2f and m_resultsSize
are calculated at the start and are correct. I've not used ztoc as I'm
happy working with the split output and not scaled the output as this
doesn't matter to me either.
Thanks for any input, been scratching my head for a few hours on this
one!
Mark
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.