dual GB: tweak frame timing. dual GB frame timing closely resembles that of lsnes-gambatte; with more than one console, there's no point trying to precisely sync to the v-timing of just one of them.

This commit is contained in:
goyuken 2012-12-30 17:38:44 +00:00
parent 4e2cc88c9d
commit 926cf64fe7
1 changed files with 3 additions and 1 deletions

View File

@ -113,6 +113,8 @@ namespace BizHawk.Emulation.Consoles.GB
for (int target = 0; target < SampPerFrame;)
{
target += step;
if (target > SampPerFrame)
target = SampPerFrame; // don't run for slightly too long depending on step
// gambatte_runfor() aborts early when a frame is produced, but we don't want that, hence the while()
while (nL < target)
@ -150,7 +152,7 @@ namespace BizHawk.Emulation.Consoles.GB
overflowL = nL - SampPerFrame;
overflowR = nR - SampPerFrame;
if (overflowL < 0 || overflowR < 0)
throw new Exception("Sound problem?");
throw new Exception("Timing problem?");
if (rendersound)
{