SharpDX.SharpDXException when starting audio source - c#

☆樱花仙子☆ 提交于 2019-12-11 16:06:16

问题


When I'm trying to record audio using accord.net, it throws an exception

Accord.Audio.DirectSound.pdb not loaded $exception {"HRESULT: [0x88780064], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Unknown"} SharpDX.SharpDXException

I'm using Windows 10 Pro 64 bit with Visual Studio 2017.

Accord.Audio - v3.8.0

Accord.Audio.DirectSound - v3.8.0

SharpDX -v2.6.3

SharpDX.DirectSound - v2.6.3

My code is here

using Accord.DirectSound;
using Accord.Audio;
namespace TestAudio
{
public partial class Form1 : Form
{
private Signal s;
public Form1()
{
    InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{  
    AudioCaptureDevice source = new AudioCaptureDevice();
    source.DesiredFrameSize = 4096;
    source.SampleRate = 22050;
    source.NewFrame += source_NewFrame;
    source.Start();
}
private void source_NewFrame(object sender, Accord.Audio.NewFrameEventArgs eventArgs)
{
    s = eventArgs.Signal;
}
}
}

来源:https://stackoverflow.com/questions/56454060/sharpdx-sharpdxexception-when-starting-audio-source-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!