Question

Currently i m kissFFT on the input data..

I had the input data in the std::vector& samples2 i want convert into the format required by the KissFFT..

I am using the following code to convert this,,

but at the end i am getting diff value please help..

here is my code

 ShortBuffer *pBuffer1 = pData->AsShortBufferN();

    std::vector<short> input(pBuffer1->GetPointer(),
            pBuffer1->GetPointer() + BUFFER_SIZE);

    kiss_fft_scalar* samples = (kiss_fft_scalar*) &input[0]; // Here my input data  is change 

please help

Was it helpful?

Solution 2

type of kiss_fft_scalar may be float, short, int32 or __m128. It is depend on same preprocessor definitions for FIXED_POINT and USE_SIMD. Check that type of kiss_fft_scalar is short.

Your compiler can help you - do not use C cast:

 kiss_fft_scalar* samples = &input[0];  // type of &input[0] must be kiss_fft_scalar* !!!

OTHER TIPS

The difault value of 'kiss_fft_scalar' is float. but It can be either of type short or float.

http://www.reproducibility.org/RSF/book/rsf/manual/manual_html/node11.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top