title: creating an integer array from .wav audio samples. NAudio C#
body: <p>I am very new to digital audio programming and am not sure on if what I am doing is correct to get the desired outcome. I am trying to take a .wav file, and save the individual samples in an array so i can analyze them. I am using NAudio AudioFileReader, the following code prints out a vast number of floating point numbers, I have no idea if they would be correct, or they are being altered when converted. Ideally I would like them as 32 bit integers. Any advice on how to get there and understand greatly appreciated.  </p>
  
  <pre><code>  AudioFileReader readertest = new AudioFileReader("C:\\Users\\minford\\Downloads\\Kalimba.wav");
    int bytesnumber = (int)readertest.Length;
    var buffer = new float[bytesnumber];
    readertest.Read(buffer,0,bytesnumber);
  
          for(int i = 0; i &lt;buffer.Length; i++){
              Console.Write(buffer[i]+ ", ");
  
          }
  </code></pre>