问题
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