Update OpenAL-CS.

Required for Win64 support.
This commit is contained in:
Paul Chote
2019-05-22 19:27:27 +00:00
committed by abcdefg30
parent aed6098eaa
commit 7cf939fc68
3 changed files with 9 additions and 9 deletions

View File

@@ -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;
}
}

View File

@@ -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"))

View File

@@ -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