From 927fb7070cf9228363770edc89655ef6dd5d1f22 Mon Sep 17 00:00:00 2001 From: goyuken Date: Wed, 10 Oct 2012 17:19:51 +0000 Subject: [PATCH] sound throttle now respects forced throttle off (user hits fastfoward button, etc) --- BizHawk.MultiClient/Global.cs | 4 ++-- BizHawk.MultiClient/MainForm.cs | 2 +- BizHawk.MultiClient/RenderPanel.cs | 2 +- BizHawk.MultiClient/Sound.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BizHawk.MultiClient/Global.cs b/BizHawk.MultiClient/Global.cs index ba3b268beb..6628017524 100644 --- a/BizHawk.MultiClient/Global.cs +++ b/BizHawk.MultiClient/Global.cs @@ -137,9 +137,9 @@ namespace BizHawk.MultiClient }; /// - /// whether vsync is force-disabled by use of fast forward + /// whether throttling is force-disabled by use of fast forward /// - public static bool ForceNoVsync; + public static bool ForceNoThrottle; //the movie will be spliced inbetween these if it is present public static CopyControllerAdapter MovieInputSourceAdapter = new CopyControllerAdapter(); diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 32f5c840ff..92eaf70e0e 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -430,7 +430,7 @@ namespace BizHawk.MultiClient void SyncThrottle() { bool fastforward = Global.ClientControls["Fast Forward"] || FastForward || Global.ClientControls["MaxTurbo"]; - Global.ForceNoVsync = unthrottled || fastforward; + Global.ForceNoThrottle = unthrottled || fastforward; // realtime throttle is never going to be so exact that using a double here is wrong throttle.SetCoreFps(Global.Emulator.CoreOutputComm.VsyncRate); diff --git a/BizHawk.MultiClient/RenderPanel.cs b/BizHawk.MultiClient/RenderPanel.cs index 5947a12cf4..ffd3a0fbcf 100644 --- a/BizHawk.MultiClient/RenderPanel.cs +++ b/BizHawk.MultiClient/RenderPanel.cs @@ -374,7 +374,7 @@ namespace BizHawk.MultiClient { get { - if (Global.ForceNoVsync) return false; + if (Global.ForceNoThrottle) return false; return Global.Config.DisplayVSync; } } diff --git a/BizHawk.MultiClient/Sound.cs b/BizHawk.MultiClient/Sound.cs index bb3e6c0313..c1114a3ab1 100644 --- a/BizHawk.MultiClient/Sound.cs +++ b/BizHawk.MultiClient/Sound.cs @@ -132,7 +132,7 @@ namespace BizHawk.MultiClient int samplesNeeded = SNDDXGetAudioSpace() * 2; short[] samples; - if (Global.Config.SoundThrottle) + if (Global.Config.SoundThrottle && !Global.ForceNoThrottle) { if (DSoundBuffer == null) return; // can cause SNDDXGetAudioSpace() = 0 int samplesWanted = 2 * (int) (0.8 + 44100.0 / Global.Emulator.CoreOutputComm.VsyncRate);