Can I use DirectX 11 from C# app?
Need to use DirectSound from WPF application. .NET 4 W7 x64
Can I use DirectX 11 from C# app?
Need to use DirectSound from WPF application. .NET 4 W7 x64
From Chuck Walbourn's Blog Titled: Games for Windows and the DirectX SDK. He seems to be recommending the SlimDx Library, according to their documentation it does support DirectSound
From the above blog:
The modern version of the DirectX SDK is designed for C/C++ native developers. If you are looking for .NET solutions for using DirectX technology, there are many options available although the choice of solution depends on your specific needs:
....
•For a developer using the Windows Presentation Foundation but wants to use the new DirectX 11 APIs, the Windows API Code Pack provides managed assemblies for Direct3D 10.1, Direct3D 11, Direct2D, DirectWrite, DXGI, and the Windows Imaging Library (WIC) along with many other Windows 7 features. The latest version supports .NET 4.0, and x64 native “anycpu” applications. Note you still need to install the DirectX SDK to get the HLSL compiler (FXC.EXE) tool.
•For developers who are invested in Managed DirectX 1.1 but are looking for updates to address the limitations I note above, the open source SlimDX library is designed to mimic Managed DirectX 1.1 for just this purpose. It includes support for x64 native “anycpu” applications, includes modern DirectX support, and is compatible with the .NET 4.0 runtime.
....
You may also want to consider the newer SharpDX. The biggest differences from SlimDX are that it doesn't support DX9 (though that's irrelevant here), and the API is directly generated from the DX SDK headers. You could even begin making Metro style apps in Windows 8 because it's ready to support Direct3D 11.1.
From Chuck Walbourn's Blog Titled: Games for Windows and the DirectX SDK. He seems to be recommending the SlimDx Library, according to their documentation it does support DirectSound
From the above blog:
The modern version of the DirectX SDK is designed for C/C++ native developers. If you are looking for .NET solutions for using DirectX technology, there are many options available although the choice of solution depends on your specific needs:
....
•For a developer using the Windows Presentation Foundation but wants to use the new DirectX 11 APIs, the Windows API Code Pack provides managed assemblies for Direct3D 10.1, Direct3D 11, Direct2D, DirectWrite, DXGI, and the Windows Imaging Library (WIC) along with many other Windows 7 features. The latest version supports .NET 4.0, and x64 native “anycpu” applications. Note you still need to install the DirectX SDK to get the HLSL compiler (FXC.EXE) tool.
•For developers who are invested in Managed DirectX 1.1 but are looking for updates to address the limitations I note above, the open source SlimDX library is designed to mimic Managed DirectX 1.1 for just this purpose. It includes support for x64 native “anycpu” applications, includes modern DirectX support, and is compatible with the .NET 4.0 runtime.
....
If you want to use DirectX 11 with C# you need a wrapper Look at the following link http://slimdx.org/
Unfortunately, both SlimDX as well as SharpDX are no longer being developed. They both still work, even with .NET6.0 (as far as I can tell), but no new features or bug fixes will make it into these.
The .NET Foundation has a new project Silk.NET that apparently targets to become a replacement for the former two and is still being developed. When I have to update my projects that currently use SlimDX I'll take a look at it.
Here is one way I have found. First you need to install DXSDK (I have June 2010 and SDK for Windows 7). Go to "Add reference" dialog press "Browse" , go to "C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0"
or "C:\Windows\Microsoft.NET\Managed DirectX\v9.02.2904"
then choose proper dll. For example - Microsoft.DirectX.dll. Then add "using Microsoft.DirectX"
directive to your project.
Bop, if you are just plan on just playing sounds then FMOD is another alternative, there is a C# wrapper available for this. If you plan on more than this, then I would like above recommend Sharpdx as it is still being supported.
© 2022 - 2024 — McMap. All rights reserved.