not sure if you are familiar with Dealing with micrphone in WP7 or not
but you can check this blog post for a full detailed tutorial :
2. 您首先设定了数据规模的缓冲:
_buffer = new byte[_microphone.GetSampleSizeInBytes(_microphone.BufferDuration)];
并且只要麦克风数据在这次活动中能够随时从麦克风中获取数据,那么你就可以做任何事情:
private void MicrophoneBufferReady(object sender, EventArgs e)
{
_microphone.GetData(_buffer);
//Do something with the data
}
you ll need to include and everything is stated in the tutorial in Details
using Microsoft.Xna.Framework.Audio;