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 genSound = false;
|
||||||
|
bool coreskipaudio = false;
|
||||||
if (runFrame)
|
if (runFrame)
|
||||||
{
|
{
|
||||||
runloop_fps++;
|
runloop_fps++;
|
||||||
|
@ -2278,9 +2279,10 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
HandleMovieOnFrameLoop();
|
HandleMovieOnFrameLoop();
|
||||||
|
|
||||||
|
coreskipaudio = Global.ClientControls["MaxTurbo"] && CurrAviWriter == null;
|
||||||
//=======================================
|
//=======================================
|
||||||
MemoryPulse.Pulse();
|
MemoryPulse.Pulse();
|
||||||
Global.Emulator.FrameAdvance(!throttle.skipnextframe, !Global.ClientControls["MaxTurbo"] || CurrAviWriter != null);
|
Global.Emulator.FrameAdvance(!throttle.skipnextframe, !coreskipaudio);
|
||||||
MemoryPulse.Pulse();
|
MemoryPulse.Pulse();
|
||||||
//=======================================
|
//=======================================
|
||||||
if (CurrAviWriter != null)
|
if (CurrAviWriter != null)
|
||||||
|
@ -2342,7 +2344,7 @@ namespace BizHawk.MultiClient
|
||||||
UpdateFrame = false;
|
UpdateFrame = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (genSound)
|
if (genSound && !coreskipaudio)
|
||||||
{
|
{
|
||||||
Global.Sound.UpdateSound();
|
Global.Sound.UpdateSound();
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,11 +176,12 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
samplesProvided = 2 * nsampgot;
|
samplesProvided = 2 * nsampgot;
|
||||||
|
|
||||||
while (samplesNeeded < samplesProvided)
|
if (!Global.ForceNoThrottle)
|
||||||
{
|
while (samplesNeeded < samplesProvided)
|
||||||
System.Threading.Thread.Sleep((samplesProvided - samplesNeeded) / 88); // let audio clock control sleep time
|
{
|
||||||
samplesNeeded = SNDDXGetAudioSpace() * 2;
|
System.Threading.Thread.Sleep((samplesProvided - samplesNeeded) / 88); // let audio clock control sleep time
|
||||||
}
|
samplesNeeded = SNDDXGetAudioSpace() * 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (asyncsoundProvider != null)
|
else if (asyncsoundProvider != null)
|
||||||
{
|
{
|
||||||
|
@ -189,8 +190,8 @@ namespace BizHawk.MultiClient
|
||||||
samples = new short[samplesNeeded];
|
samples = new short[samplesNeeded];
|
||||||
//if (asyncsoundProvider != null && Muted == false)
|
//if (asyncsoundProvider != null && Muted == false)
|
||||||
//{
|
//{
|
||||||
semisync.BaseSoundProvider = asyncsoundProvider;
|
semisync.BaseSoundProvider = asyncsoundProvider;
|
||||||
semisync.GetSamples(samples);
|
semisync.GetSamples(samples);
|
||||||
//}
|
//}
|
||||||
//else asyncsoundProvider.DiscardSamples();
|
//else asyncsoundProvider.DiscardSamples();
|
||||||
samplesProvided = samplesNeeded;
|
samplesProvided = samplesNeeded;
|
||||||
|
|
Loading…
Reference in New Issue