make running out of AL sources nonfatal.

This commit is contained in:
Chris Forbes
2010-03-09 00:01:17 +13:00
parent a4032d069e
commit 4f35eaccc5

View File

@@ -177,7 +177,11 @@ namespace OpenRA
var source = 0; var source = 0;
Al.alGenSources(1, out source); Al.alGenSources(1, out source);
if (0 != Al.alGetError()) 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); sourcePool.Add(source, false);
} }
} }