sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.7k stars 639 forks source link

XAudio 2.9 not working on Windows 10 with NETPortable #715

Open xanather opened 8 years ago

xanather commented 8 years ago

I get this error when trying to load XAudio 2.9 on windows 10. https://github.com/sharpdx/SharpDX/blob/master/Source/SharpDX.XAudio2/XAudio2.cs#L129

Which is strange because the msdn documentation states that AUDIO2_9.DLL comes installed with Windows 10.

Should this compilation check be here? https://github.com/sharpdx/SharpDX/blob/master/Source/SharpDX.XAudio2/XAudio2.cs#L108

I am using NETPortable of SharpDX 3.0.1.

xanather commented 8 years ago

I just reflected into SharpDX.XAudio2.dll that I am using, I can confirm the XAudio2.9 switch case is not there, XAudio 2.7 support on NETPortable is missing too which is surprising (that's another bug?).

xoofx commented 8 years ago

Yes, it was on purpose, because the 2.9 profile was not passing certification on Windows 8 and I would have had to release a third platform/PCL only for Windows 10. For now, if you really need to access XAudio2.9, you can always compile the library on your side (and specifying the STORE_APP_10 to true in the Presettings targets, or DESKTOP_APP when compiling on desktop) Now that the compilation process is slightly easier, I may be able to compile for a Windows 10 Store App only target, a bit cumbersome but possible.

xanather commented 8 years ago

While Windows 10 store app support would be nice I would like to point out that I am using PCL not for store apps but because they work on .NET Core. .NET Core has the capability to on Windows 7 and above (which means XAudio2.7 through to XAudio2.9 should be supported somehow theoretically).

Should .NET Core be a properly supported run-time going forward? Cross-plat engines may be interested on developing on-top of .net core (Direct3D/XAudio support on windows platforms atleast) once it matures more.

.NET Framework target could be moved over (https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-standard-applications.md) in order to support both .NET Core and .NET Framework in the future (and even possibly the win store targets), just wondering your opinion on it.

I am willing to add a managed win forms library window to SharpDX that has no dependencies on Windows.Forms (since Windows.Forms is not supported on .NET Core) if .NET Core should be supported in the future.

xanather commented 8 years ago

@xoofx would .NET Core support be something you want someone else to look into otherwise? If someone added support would it be merged? I can look into it when .NET Core RC2 comes around and there is better tooling (should be coming end of the month at BUILD).

xoofx commented 8 years ago

The migration to xproj+project.json should not be much a problem, but I would prefer for SharpDX to wait for proper tooling (currently, xproj requires a full recompilation of everything even if nothing changed in a project). FYI, SharpDX has been already used on CoreCLR with PCL libraries.

xanather commented 8 years ago

Alright thanks for the info. SharpDX PCL does seem to work fine with CoreCLR other than the limited XAudio2 support (not sure if other SharpDX API's are restricted due to PCL verification).

xoofx commented 8 years ago

not sure if other SharpDX API's are restricted due to PCL verification

Note that the (non)support for 2.9 is not related to PCL but to Windows 8/UWP certification. But on desktop, it should be possible to enable it without much problems...