Closed dmitrykos closed 1 year ago
Overlooked that WDMKS is also using GetVersion
, just added it into the PR.
In addition to my one review comment, could you please let us know what tests you have run on this new code.
I tested on Windows 10:
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
before paHostApiInitializers[0].
getting Windows version with RtlGetVersion(): major=10, minor=0, build=19045, platform=2
Windows version=10
also Windows UWP and the lowest I have is Windows Server 2003 R2. I did not test on Windows Vista, 7, 8.
Windows Server 2003 R2 is practically latest Windows XP with 3790 build (https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions) which is detected correctly:
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
before paHostApiInitializers[0].
getting Windows version with RtlGetVersion(): major=5, minor=2, build=3790, platform=2
Windows version=5
Unfortunately I did not implement testing of every Windows version that could be done with Docker I believe due to lack of time resource. The underlying implementation is a copy-paste from the WASAPI's implementation which is time-tested on Windows Vista, 7, 8.
As per discussion in #796 introducing a single API for getting Windows OS version in PA that will improve client code readability and reliability.
Additionally:
PaWinUtil_GetOsVersion()
instead of direct OS API