sound throttle now respects forced throttle off (user hits fastfoward button, etc)
This commit is contained in:
parent
a5e2c55a68
commit
927fb7070c
|
@ -137,9 +137,9 @@ namespace BizHawk.MultiClient
|
|||
};
|
||||
|
||||
/// <summary>
|
||||
/// whether vsync is force-disabled by use of fast forward
|
||||
/// whether throttling is force-disabled by use of fast forward
|
||||
/// </summary>
|
||||
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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -374,7 +374,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
get
|
||||
{
|
||||
if (Global.ForceNoVsync) return false;
|
||||
if (Global.ForceNoThrottle) return false;
|
||||
return Global.Config.DisplayVSync;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue