Tidy muting code.

This commit is contained in:
Paul Chote
2016-08-01 19:05:38 +01:00
parent 9437a86e7e
commit 5a7a69a875
2 changed files with 3 additions and 9 deletions

View File

@@ -43,6 +43,9 @@ namespace OpenRA
public Sound(IPlatform platform, SoundSettings soundSettings)
{
soundEngine = platform.CreateSound(soundSettings.Device);
if (soundSettings.Mute)
MuteAudio();
}
ISoundSource LoadSound(ISoundLoader[] loaders, IReadOnlyFileSystem fileSystem, string filename)
@@ -223,12 +226,6 @@ namespace OpenRA
soundEngine.PauseSound(music, true);
}
public float GlobalVolume
{
get { return soundEngine.Volume; }
set { soundEngine.Volume = value; }
}
float soundVolumeModifier = 1.0f;
public float SoundVolumeModifier
{

View File

@@ -207,9 +207,6 @@ namespace OpenRA.Platforms.Default
if (!TryGetSourceFromPool(out source))
return null;
if (Game.Settings.Sound.Mute)
Game.Sound.MuteAudio();
var slot = sourcePool[source];
slot.Pos = pos;
slot.FrameStarted = currFrame;