diff --git a/OpenRA.Platforms.Default/OpenAlSoundEngine.cs b/OpenRA.Platforms.Default/OpenAlSoundEngine.cs index f11847d2b4..d2f1390ac4 100644 --- a/OpenRA.Platforms.Default/OpenAlSoundEngine.cs +++ b/OpenRA.Platforms.Default/OpenAlSoundEngine.cs @@ -136,7 +136,7 @@ namespace OpenRA.Platforms.Default for (var i = 0; i < PoolSize; i++) { var source = 0U; - AL10.alGenSources(new IntPtr(1), out source); + AL10.alGenSources(1, out source); if (AL10.alGetError() != AL10.AL_NO_ERROR) { Log.Write("sound", "Failed generating OpenAL source {0}", i); @@ -392,15 +392,15 @@ namespace OpenRA.Platforms.Default public OpenAlSoundSource(byte[] data, int byteCount, int channels, int sampleBits, int sampleRate) { SampleRate = sampleRate; - AL10.alGenBuffers(new IntPtr(1), out buffer); - AL10.alBufferData(buffer, OpenAlSoundEngine.MakeALFormat(channels, sampleBits), data, new IntPtr(byteCount), new IntPtr(sampleRate)); + AL10.alGenBuffers(1, out buffer); + AL10.alBufferData(buffer, OpenAlSoundEngine.MakeALFormat(channels, sampleBits), data, byteCount, sampleRate); } protected virtual void Dispose(bool disposing) { if (!disposed) { - AL10.alDeleteBuffers(new IntPtr(1), ref buffer); + AL10.alDeleteBuffers(1, ref buffer); disposed = true; } } diff --git a/thirdparty/fetch-thirdparty-deps.ps1 b/thirdparty/fetch-thirdparty-deps.ps1 index fe189e3b61..1773a13960 100644 --- a/thirdparty/fetch-thirdparty-deps.ps1 +++ b/thirdparty/fetch-thirdparty-deps.ps1 @@ -124,7 +124,7 @@ if (!(Test-Path "OpenAL-CS.dll")) { echo "Fetching OpenAL-CS from GitHub." $target = Join-Path $pwd.ToString() "OpenAL-CS.dll" - (New-Object System.Net.WebClient).DownloadFile("https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll", $target) + (New-Object System.Net.WebClient).DownloadFile("https://github.com/OpenRA/OpenAL-CS/releases/download/20180106/OpenAL-CS.dll", $target) } if (!(Test-Path "Eluant.dll")) diff --git a/thirdparty/fetch-thirdparty-deps.sh b/thirdparty/fetch-thirdparty-deps.sh index 5b7f9ccd19..a3381520d2 100755 --- a/thirdparty/fetch-thirdparty-deps.sh +++ b/thirdparty/fetch-thirdparty-deps.sh @@ -71,11 +71,11 @@ fi if [ ! -f OpenAL-CS.dll ] || [ ! -f OpenAL-CS.dll.config ]; then echo "Fetching OpenAL-CS from GitHub." if command -v curl >/dev/null 2>&1; then - curl -s -L -O https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll - curl -s -L -O https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll.config + curl -s -L -O https://github.com/OpenRA/OpenAL-CS/releases/download/20180106/OpenAL-CS.dll + curl -s -L -O https://github.com/OpenRA/OpenAL-CS/releases/download/20180106/OpenAL-CS.dll.config else - wget -cq https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll - wget -cq https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll.config + wget -cq https://github.com/OpenRA/OpenAL-CS/releases/download/20180106/OpenAL-CS.dll + wget -cq https://github.com/OpenRA/OpenAL-CS/releases/download/20180106/OpenAL-CS.dll.config fi fi