How I could convert array of type short to array of type double in C/C++?
I have code to read audio data from wav file and output is array of type short. So now I want to use this data for FFT (I don’t want use libraries).
Any tricks or ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t convert the array; you can however create a new array with the converted values:
Even better would be to use
std::array<float, 10> src;etc.If your “arrays” are really dynamic data structures, it becomes even easier: