Http://bbs.51cto.com/archiver/tid-863385.html
Void microphone_bufferready (Object sender, eventargs E)
{
This. Dispatcher. begininvoke () =>
{
Microphone. getdata (buffer );
Stream. Write (buffer, 0, buffer. Length );
Timespan tstemp = timer. elapsed;
Textblockseconds. TEXT = tstemp. hours. tostring (). padleft (2, '0') + ":" + tstemp. minutes. tostring (). padleft (2, '0') + ":" + tstemp. seconds. tostring (). padleft (2, '0 ');
If (timer. elapsed. Seconds> 5)
Dostop ();
});
}
Private void buttonrecord_click (Object sender, routedeventargs E)
{
Disablerecordbutton ();
Timer = new stopwatch ();
Timer. Start ();
Stream = new memorystream ();
Textblockseconds. Text = "00:00:00 ";
Textblockstatus. Text = "Recording :";
Microphone. bufferduration = timespan. frommilliseconds (500 );
Buffer = new byte [microphone. getsamplesizeinbytes (microphone. bufferduration)];
Microphone. bufferready + = new eventhandler <eventargs> (microphone_bufferready );
Microphone. Start ();
}
Private void dostop ()
{
If (timer. isrunning)
Timer. Stop ();
If (microphone. State = microphonestate. Started)
{
Microphone. Stop ();
Textblockstatus. Text = "stopped: Ready to save ";
}
Else
{
Textblockstatus. Text = "ready :";
}
Textblockseconds. Text = string. empty;
Enablerecordbutton ();
}
Http://www.cnblogs.com/zhangyafeng/archive/2009/12/10/1621213.html
Http://www.devdiv.com/thread-23384-1-1.html
Streaming Media Playback
Http://www.silverlightchina.net/html/zhuantixilie/winphone7/2011/0930/10757.html
Http://www.silverlightchina.net/plus/search.php? Kwtype = 0 & keyword = % D2 % F4 % C6 % B5 & searchtype = titlekeyword
Http://www.silverlightchina.net/plus/search.php? Kwtype = 0 & keyword = Audio & searchtype = titlekeyword
Http://www.silverlightchina.net/html/developer/silverlight/2010/0521/1166.html
Http://www.cnblogs.com/imobiler/archive/2010/12/23/1914353.html