Search code examples
c#xaudio2

XAudio2 with C#


I am looking to replace my 32bit DirectSound audio API with XAudio2. Does XAudio2 work with a 64bit C# application? If so, I am not entirely sure how to setup the project to begin using XAudio2. All the examples I have seen online are for C++.


Solution

  • XAudio2 doesn't support C# directly but you can call it using SharpDX, which is a managed .NET wrapper of DirectX API. Here you can find a few samples to get started. Other possibilities that I haven't tried but should work: