【发布时间】:2019-03-15 17:05:43
【问题描述】:
下载最新的CSCORE项目,将AudioPlayerSample设置为启动,编译调试。立即报错:方法或操作没有实现。在 Lenovo Windows 10 Home 和 Visual Studio 2017 社区上运行
编辑。这是一个 STUPID 错误,每个 Windows 都有不同的 SDK 路径,CSCore 只有一个,所以 CSCore 在不更改项目文件的情况下在 Windows 8.1 上运行,而不是在 7 或 10 上:请参阅我的评论:CSCore issues
堆栈跟踪(每个堆栈条目下方添加了源代码)是:
System.NotImplementedException
HResult=0x80004001
Message=The method or operation is not implemented.
Source=CSCore
StackTrace:
at CSCore.CoreAudioAPI.InteropCalls.CallI(Void* _basePtr, IntPtr intPtr, Void* p) in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\CSCore\CoreAudioAPI\InteropCalls.cs:line 204 :
throw new NotImplementedException();
at CSCore.CoreAudioAPI.MMDeviceEnumerator.RegisterEndpointNotificationCallbackNative(IMMNotificationClient notificationClient) in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\CSCore\CoreAudioAPI\MMDeviceEnumerator.cs:line 267 :
result = InteropCalls.CallI(UnsafeBasePtr,
Marshal.GetComInterfaceForObject(notificationClient, typeof(IMMNotificationClient)),
((void**)(*(void**)UnsafeBasePtr))[6]);
at CSCore.CoreAudioAPI.MMDeviceEnumerator.RegisterEndpointNotificationCallback(IMMNotificationClient notificationClient) in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\CSCore\CoreAudioAPI\MMDeviceEnumerator.cs:line 253 :
CoreAudioAPIException.Try(RegisterEndpointNotificationCallbackNative(notificationClient), InterfaceName,
"RegisterEndpointNotificationCallback");
at CSCore.CoreAudioAPI.MMDeviceEnumerator..ctor() in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\CSCore\CoreAudioAPI\MMDeviceEnumerator.cs:line 135 :
RegisterEndpointNotificationCallback(_notificationClient);
at AudioPlayerSample.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\Samples\AudioPlayerSample\Form1.cs:line 126 :
using (var mmdeviceEnumerator = new MMDeviceEnumerator())
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
有人遇到过这种情况并找到解决方案吗?
【问题讨论】:
标签: cscore