gpt4 book ai didi

c# - HRESULT 异常 : 0xC00D36B4

转载 作者:行者123 更新时间:2023-11-30 17:52:10 25 4
gpt4 key购买 nike

我在使用 Windows.Media.Capture 命名空间中的 MediaCapture 对象时收到此异常消息 Exception from HRESULT: 0xC00D36B4。当我尝试使用 StartRecordToStreamAsync 方法开始录制音频时发生异常。这是我的完整代码

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);

有人可以给我一些提示,说明我在这里做错了什么吗?或者我应该怎么做才能正常运行它。

谢谢

最佳答案

看起来 createMp3 还不被支持。

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

关于c# - HRESULT 异常 : 0xC00D36B4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18594910/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com