 <p>It Seems that DataAvailable callback is getting called even when buffer is null.</p> <p>I modified a function in <code>WaveIn.cs</code> file and its working fine now. I am not sure if this is correct, but for now, this is working for me.</p> <pre><code>private void Callback(IntPtr waveInHandle, WaveInterop.WaveMessage message, IntPtr userData, WaveHeader waveHeader, IntPtr reserved) { if (message == WaveInterop.WaveMessage.WaveInData) { GCHandle hBuffer = (GCHandle)waveHeader.userData; WaveInBuffer buffer = (WaveInBuffer)hBuffer.Target; if (buffer != null) { if (DataAvailable != null) { DataAvailable(this, new WaveInEventArgs(buffer.Data, buffer.BytesRecorded)); } if (recording) { buffer.Reuse(); } } else { if (RecordingStopped != null) { RecordingStopped(this, EventArgs.Empty); } } } </code></pre> <p>}</p>