spu2-x: Update XAudio to 2.9 #3241
Conversation
|
Maybe I'm wrong, but wouldn't you need to add
somewhere (as hinted on the website) for automatic download to happen? |
|
I don't want all this faffing for an EOL OS. |
4f4ad94
to
9918735
Nuget restore works on appveyor now.
Using XAudio 2.9 allows backwards compatibility with both Windows 7 and 8 while simplifying code for spu2-x. It is annoying dealing with nuget but the process of getting the packages for compiling happens in the background. It would be nice to have the |
Yes it's annoying. Which is why I don't want to deal with it now or in the future. |
|
Fair enough, is it safe to assume Windows 7 won't be supported for 1.8 release? If that's the case I can still simplify the code without dealing with nuget. Or I can include the contents of the nuget package into the 3rdparty folder that way we still don't have to deal with nuget and still use the same code for win7/8/10. |
|
Sigh, I could get 2 seconds on the first start are a downer... But doesn't xz init take already even more than that?
[1]? [2]? |
|
@MonJamp we plan to drop it following 1.6.0 which is the upcoming release. So it'll get dropped in 1.7.0 and 1.8.0 (won't be out for some time) will not support win7. Sorry you put this effort in just for me to tell you to kill it. |
lol it's fine, I had a feeling this pr would get killed due to nuget. The changes needed to drop XAudio 2.7 (dropping win7 support) are basically the same anyways. |
|
You can still make those changes if you feel inclined to do so btw. |
This allows simplification of XAudio code in spu2-x since XAudio 2.9 comes with a redistributable dll which is backwards compatible with Windows 7/8. I have tested the compiled plugin on a Windows 7 VM and can confirm it works. I removed all code which checks for the version of Windows for XAudio since it is no longer needed.
I'm pretty new to contributing to open source so I would like some feedback on some of the changes I made.
The NuGet package manager is needed to download the package which includes the headers and libs. I chose to exclude the
packagesdirectory and instead let NuGet automatically download it when building spu2-x. This does mean there's an extra step to building PCSX2. Another route I could've taken is to leave thepackagesdirectory with the XAudio 2.9 package. This would mean distributing Microsoft's dll files and headers which contain a license although I believe they do allow distributing those files without modification.In order to load the library I had to use this bit of code
xAudio2DLL = LoadLibrary(L".\\plugins\\xaudio2_9redist.dll");. This hard coded string to a specific directory is inevitable since the NuGet Package Manager downloads binaries to a project's output directory. I was wondering if there was a better way around this. AFAIK NuGet is pretty rigid and this can't be easily changed.I'm open to any suggestions and making any changes.
#Resolves #3232
Edit: Looks like CI fails since it doesn't download the NuGet package. So I guess the best way would be to include the package in the repo.