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

Data from buffer in array(C#)

Mar 31, 2011 at 3:35 PM

Excuse me for my bad English in advance.
How can I get through the library NAudio data from an audio buffer (microphone) into a double array in C #? Or other type of array, for me to convert the variable is not an issue.
So I clicked on the button -> array filled -> button pressed and the array is finished.
I honestly say that I have not even any thoughts = (.
Thanks in advance for any help!

Apr 6, 2011 at 5:19 PM

when you record from the microphone, you get a byte array. You can use the .NET BitConverter function to convert each pair of bytes to a short sample value. Then turn those sample values into doubles (usually by dividing by 32768.0)


Apr 6, 2011 at 5:35 PM

Big thanks!