Running SharpDX audio samples in Windows 8 Release Preview crashes
Question
I downloaded latest SharpDX v2.2 and built the samples in the SharpDXSamples.sln
When I attempt to run an example that uses XAudio2,
the sample crashes with the following error
Here's the stack trace:
at SharpDX.Result.CheckError()
at SharpDX.Utilities.CreateComInstance(Guid clsid, CLSCTX clsctx, Guid riid, ComObject comObject)
at SharpDX.XAudio2.XAudio2..ctor(XAudio2Flags flags, ProcessorSpecifier processorSpecifier)
at SharpDX.XAudio2.XAudio2..ctor()
at PlayDynamicSound.Program.Main(String[] args) in c:\Users\James\Documents\Visual Studio 2012\Projects\SharpDX-Full-2.2.0\Samples\XAudio2\PlayDynamicSound\Program.cs:line 38
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Any ideas on what is going on? Do I need some other library installed???
Solution
Currently, SharpDX desktop samples are working if you have installed DirectX Runtime June 2010 Runtime
They have not been yet ported to use DirectX11.1, though changes are minimal. If you want to use DirectX11.1, you need to change referenced assemblies from standard-net20 to Win8Desktop-net20 and also a couple of compilation errors to fix (methods changed/removed in DirectX11.1).
Work has been focused so far on Windows 8 Metro, but future SharpDX release will hopefully provide compatible desktop samples running under DirectX June 2010 and DirectX11.1.