Downloaded the most recent CSCORE project, set the AudioPlayerSample as startup, compiled an debugged. Immediately an error: The method or operation is not implemented. Running on Lenovo Windows 10 Home and Visual Studio 2017 Community
Edit. This is a STUPID error, each Windows has a different path for the SDK, CSCore has only one, so CSCore, without changing the project file, runs on Windows 8.1 not on 7 or 10: see my comment in the: CSCore issues
The stacktrace (with the sourcelines added below each stackentry) is:
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)
Anyone experienced this and found a solution?
Open the CSCore.csproj file.
at the bottom in the postcompilation script locate the set sdk=%25PROGRAMFILES(x86)%25\Microsoft SDKs\Windows\
line and check in your PROGRAMFILES(x86)\Microsoft SDKs\Windows where the ildasm.exe file is to be found.
change the set sdk such that the directoryname is the one you found on your pc.
User contributions licensed under CC BY-SA 3.0