From 4f35eaccc5d8bd09ee662023b08c05d0cb7af686 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 9 Mar 2010 00:01:17 +1300 Subject: [PATCH] make running out of AL sources nonfatal. --- OpenRA.Game/Sound.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Sound.cs b/OpenRA.Game/Sound.cs index 044fcef768..b2d15fb330 100644 --- a/OpenRA.Game/Sound.cs +++ b/OpenRA.Game/Sound.cs @@ -177,7 +177,11 @@ namespace OpenRA var source = 0; Al.alGenSources(1, out source); if (0 != Al.alGetError()) - throw new InvalidOperationException("failed generating source {0}".F(i)); + { + Log.Write("Failed generating OpenAL source {0}", i); + return; + } + sourcePool.Add(source, false); } }