Tidy muting code.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user