Exception from HRESULT: 0xC00D36B4

3

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

c#
exception
audio
windows-store-apps
media
asked on Stack Overflow Sep 3, 2013 by Madu • edited Sep 3, 2013 by iabbott

2 Answers

1

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.

Reference

0

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.

answered on Stack Overflow Sep 11, 2014 by user3506770

User contributions licensed under CC BY-SA 3.0