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

Getting audio buffer data

Aug 19, 2011 at 11:20 PM

Is there a way to obtain the audio buffer data from a Wave file read from WaveFileReader? I would like to eventually save it to a file.

Aug 20, 2011 at 12:49 AM

I assumed that to do so was

 

byte[] buffer = new byte[wave.Length];

wave.Read(buffer, 0, (int)wave.Length);

 

However, is wave.length the length of the audio data buffer, or is it the length in respect to duration? If not duration, how can I get the duration?

Sep 22, 2011 at 4:57 PM

the length is measured in bytes of audio data, so this will work. Usually you would read through a WAV file in smaller chunks.