From 0eda3bd2abd75b1e3829ccdcdb49848162d85856 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 13 Mar 2011 19:30:56 +0000 Subject: [PATCH] make sound toggling work a little better --- BizHawk.MultiClient/Sound.cs | 5 ++--- BizHawk.MultiClient/config/SoundConfig.cs | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.MultiClient/Sound.cs b/BizHawk.MultiClient/Sound.cs index 29c69d7d9b..f71deb1b57 100644 --- a/BizHawk.MultiClient/Sound.cs +++ b/BizHawk.MultiClient/Sound.cs @@ -7,7 +7,6 @@ namespace BizHawk.MultiClient { public class Sound : IDisposable { - public bool SoundEnabled = true; public bool Muted = false; private bool disposed = false; @@ -44,7 +43,7 @@ namespace BizHawk.MultiClient public void StartSound() { if (disposed) throw new ObjectDisposedException("Sound"); - if (SoundEnabled == false) return; + if (Global.Config.SoundEnabled == false) return; if(IsPlaying) return; @@ -112,7 +111,7 @@ namespace BizHawk.MultiClient public void UpdateSound(ISoundProvider soundProvider) { - if (SoundEnabled == false || disposed) + if (Global.Config.SoundEnabled == false || disposed) return; int samplesNeeded = SNDDXGetAudioSpace()*2; diff --git a/BizHawk.MultiClient/config/SoundConfig.cs b/BizHawk.MultiClient/config/SoundConfig.cs index f13513f33c..bf14a204d2 100644 --- a/BizHawk.MultiClient/config/SoundConfig.cs +++ b/BizHawk.MultiClient/config/SoundConfig.cs @@ -26,6 +26,7 @@ namespace BizHawk.MultiClient { Global.Config.SoundEnabled = SoundOnCheckBox.Checked; Global.Config.MuteFrameAdvance = MuteFrameAdvance.Checked; + Global.Sound.StartSound(); this.Close(); }