make sound toggling work a little better
This commit is contained in:
parent
1d73742000
commit
0eda3bd2ab
|
@ -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;
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Global.Config.SoundEnabled = SoundOnCheckBox.Checked;
|
||||
Global.Config.MuteFrameAdvance = MuteFrameAdvance.Checked;
|
||||
Global.Sound.StartSound();
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue