From 13fbcc56eea5509f302346a0957ac2e061546a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 16 Jun 2013 14:26:21 +0200 Subject: [PATCH] inform the user which sound engine is used --- OpenRA.Game/Sound.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Sound.cs b/OpenRA.Game/Sound.cs index fda10c5e55..6760ff7c7b 100644 --- a/OpenRA.Game/Sound.cs +++ b/OpenRA.Game/Sound.cs @@ -53,7 +53,7 @@ namespace OpenRA static ISoundEngine CreateEngine(string engine) { - engine = Game.Settings.Server.Dedicated?"Null":engine; + engine = Game.Settings.Server.Dedicated ? "Null" : engine; switch (engine) { /* TODO: if someone cares about pluggable crap here, ship this out */ case "AL": return new OpenAlSoundEngine(); @@ -374,6 +374,7 @@ namespace OpenRA public OpenAlSoundEngine() { + Console.WriteLine("Using OpenAL sound engine"); //var str = Alc.alcGetString(IntPtr.Zero, Alc.ALC_DEFAULT_DEVICE_SPECIFIER); var dev = Alc.alcOpenDevice(null); if (dev == IntPtr.Zero) @@ -645,6 +646,11 @@ namespace OpenRA class NullSoundEngine : ISoundEngine { + public NullSoundEngine() + { + Console.WriteLine("Using Null sound engine which disables SFX completely"); + } + public ISoundSource AddSoundSourceFromMemory(byte[] data, int channels, int sampleBits, int sampleRate) { return new NullSoundSource();