This project has moved and is read-only. For the latest updates, please go here.

Record audio from MIC to array (for the implementation of goertzel's algorithm)

Oct 3, 2012 at 3:13 PM


How are you?

I came here because i need to implement the goertzel's algorithm ( for the sounds that are captured by the microphone.

I have read the tutorials and compiled them with my VS2010 and, rigth now, i can take audio from the mic and playing it on the speakers... I can't find how could i convert the sound to an array of float in order to apply the algorithm.


Any ideas?


Oct 6, 2012 at 7:56 PM

Assuming you are recording in 16 bit, every two bytes is a sample.. Use BitConverter.ToInt16 to get those samples. Then, to get a float value, you would normally divide by 32,768f to get it into the range +/- 1.0