Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am trying to do something similar and this is what I found looking through MSDN/Samples...</p> <pre><code>private async void OnStartRecordingBtnClick(object sender, RoutedEventArgs e) { try { m_mediaCaptureMgr = new MediaCapture(); var settings = new MediaCaptureInitializationSettings(); settings.StreamingCaptureMode = StreamingCaptureMode.Audio; await m_mediaCaptureMgr.InitializeAsync(settings); } catch (Exception exception) { // Do Exception Handling } } private async void OnStopRecordingBtnClick(object sender, RoutedEventArgs e) { try { String fileName; if (!m_bRecording) { fileName = "audio.mp4"; m_recordStorageFile = await Windows.Storage.KnownFolders.VideosLibrary.CreateFileAsync(fileName, Windows.Storage.CreationCollisionOption.GenerateUniqueName); MediaEncodingProfile recordProfile = null; recordProfile = MediaEncodingProfile.CreateM4a(Windows.Media.MediaProperties.AudioEncodingQuality.Auto); await m_mediaCaptureMgr.StartRecordToStorageFileAsync(recordProfile, this.m_recordStorageFile); m_bRecording = true; } else { await m_mediaCaptureMgr.StopRecordAsync(); m_bRecording = false; if (!m_bSuspended) { var stream = await m_recordStorageFile.OpenAsync(Windows.Storage.FileAccessMode.Read); playbackElement.AutoPlay = true; playbackElement.SetSource(stream, this.m_recordStorageFile.FileType); } } } catch (Exception exception) { // Do Exception Handling... m_bRecording = false; } } </code></pre> <p>Hope this helps. Here is the MSDN link: <a href="http://code.msdn.microsoft.com/windowsapps/Media-Capture-Sample-adf87622/sourcecode?fileId=52175&amp;pathId=607147175" rel="nofollow">enter link description here</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload