![]() ![]() This is because unlike Silverlight, the XNA framework is not event driven. If you run the code above as is you will get this helpful FrameworkDispatcher.Update has not been called exception. Since our buffer duration here is 300ms the BufferReady event will fire every 300ms. Private void MicrophoneBufferReady(object sender, EventArgs e) _microphone.BufferReady += new EventHandler(MicrophoneBufferReady) _microphone.BufferDuration = TimeSpan.FromMilliseconds(300) The BufferReady event fires when ever the buffer has been filled with audio data. Once this is done you can use the Microphone.Default class to begin recording audio, by handling the BufferReady event. ![]() ![]() The good news is that XNA does support recording audio for games, and we can still make use of the XNA libraries even though we’re in Silverlight. Audio recording support only came to Silverlight in version 4, so there is no direct support for it in WP7 Silverlight apps. It’s fairly easy to record PCM audio data directly from the phone’s microphone in Windows Phone 7, but there are a few things to remember.įirstly, the phone runs Silverlight 3. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |