reunbreak turbo (both normal turbo and turboturbo) with sound throttling
This commit is contained in:
parent
b40897bb77
commit
92827272a6
|
@ -2242,6 +2242,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
|
||||
bool genSound = false;
|
||||
bool coreskipaudio = false;
|
||||
if (runFrame)
|
||||
{
|
||||
runloop_fps++;
|
||||
|
@ -2278,9 +2279,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
HandleMovieOnFrameLoop();
|
||||
|
||||
coreskipaudio = Global.ClientControls["MaxTurbo"] && CurrAviWriter == null;
|
||||
//=======================================
|
||||
MemoryPulse.Pulse();
|
||||
Global.Emulator.FrameAdvance(!throttle.skipnextframe, !Global.ClientControls["MaxTurbo"] || CurrAviWriter != null);
|
||||
Global.Emulator.FrameAdvance(!throttle.skipnextframe, !coreskipaudio);
|
||||
MemoryPulse.Pulse();
|
||||
//=======================================
|
||||
if (CurrAviWriter != null)
|
||||
|
@ -2342,7 +2344,7 @@ namespace BizHawk.MultiClient
|
|||
UpdateFrame = false;
|
||||
}
|
||||
|
||||
if (genSound)
|
||||
if (genSound && !coreskipaudio)
|
||||
{
|
||||
Global.Sound.UpdateSound();
|
||||
}
|
||||
|
|
|
@ -176,11 +176,12 @@ namespace BizHawk.MultiClient
|
|||
|
||||
samplesProvided = 2 * nsampgot;
|
||||
|
||||
while (samplesNeeded < samplesProvided)
|
||||
{
|
||||
System.Threading.Thread.Sleep((samplesProvided - samplesNeeded) / 88); // let audio clock control sleep time
|
||||
samplesNeeded = SNDDXGetAudioSpace() * 2;
|
||||
}
|
||||
if (!Global.ForceNoThrottle)
|
||||
while (samplesNeeded < samplesProvided)
|
||||
{
|
||||
System.Threading.Thread.Sleep((samplesProvided - samplesNeeded) / 88); // let audio clock control sleep time
|
||||
samplesNeeded = SNDDXGetAudioSpace() * 2;
|
||||
}
|
||||
}
|
||||
else if (asyncsoundProvider != null)
|
||||
{
|
||||
|
@ -189,8 +190,8 @@ namespace BizHawk.MultiClient
|
|||
samples = new short[samplesNeeded];
|
||||
//if (asyncsoundProvider != null && Muted == false)
|
||||
//{
|
||||
semisync.BaseSoundProvider = asyncsoundProvider;
|
||||
semisync.GetSamples(samples);
|
||||
semisync.BaseSoundProvider = asyncsoundProvider;
|
||||
semisync.GetSamples(samples);
|
||||
//}
|
||||
//else asyncsoundProvider.DiscardSamples();
|
||||
samplesProvided = samplesNeeded;
|
||||
|
|
Loading…
Reference in New Issue