i am getting this exception message Exception from HRESULT: 0xC00D36B4
while using MediaCapture
object from Windows.Media.Capture
namespace. The exception occurs when i try to start recording the audio using the method StartRecordToStreamAsync
. Here is my complete code
MediaCapture mediaCapture = new MediaCapture();
var capturesettings = new MediaCaptureInitializationSettings();
capturesettings.StreamingCaptureMode = StreamingCaptureMode.Audio;
await mediaCapture.InitializeAsync(capturesettings);
MediaEncodingProfile encodingProfile =
MediaEncodingProfile.CreateMp3(AudioEncodingQuality.Medium);
InMemoryRandomAccessStream iStream = new InMemoryRandomAccessStream();
await mediaCapture.StartRecordToStreamAsync(encodingProfile, iStream);
Can some body can give me some hint that what i am doing wrong here? or what should i do to run it properly.
Thanks
It looks like createMp3
is not supported yet.
Note While it is technically possible to call CreateMp3, you cannot use this profile to transcode or encode audio into the MP3 format for Windows Phone Store apps. This is because an MP3 encoder is not shipped with Windows Phone. This API is included for completeness and allows you to use it with 3rd party MP3 encoders that you include with your app.
Try to follow the example explained in this page: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn642092.aspx
I follow it to save a video from a webcam (changing the given code in a timely manner as you have already done by the code you've posted) and it works well.
User contributions licensed under CC BY-SA 3.0