Merge pull request #1579 from reicast/ghz/speedlimit
audio wait only if fullspeed (improvements over #1577)
This commit is contained in:
commit
397302b379
|
@ -88,6 +88,8 @@ double full_rps;
|
|||
static u32 lightgun_line = 0xffff;
|
||||
static u32 lightgun_hpos;
|
||||
|
||||
double mspdf;
|
||||
|
||||
u32 fskip=0;
|
||||
//called from sh4 context , should update pvr/ta state and everything else
|
||||
int spg_line_sched(int tag, int cycl, int jit)
|
||||
|
@ -174,7 +176,7 @@ int spg_line_sched(int tag, int cycl, int jit)
|
|||
}
|
||||
|
||||
double frames_done=spd_cpu/2;
|
||||
double mspdf=1/frames_done*1000;
|
||||
mspdf=1/frames_done*1000;
|
||||
|
||||
full_rps=(spd_fps+fskip/ts);
|
||||
|
||||
|
|
|
@ -140,6 +140,7 @@ u32 asRingFreeCount()
|
|||
return RingBufferSampleCount-asRingUsedCount();
|
||||
}
|
||||
|
||||
extern double mspdf;
|
||||
void WriteSample(s16 r, s16 l)
|
||||
{
|
||||
const u32 ptr=(WritePtr+1)%RingBufferSampleCount;
|
||||
|
@ -149,7 +150,9 @@ void WriteSample(s16 r, s16 l)
|
|||
|
||||
if (WritePtr==(SAMPLE_COUNT-1))
|
||||
{
|
||||
PushAudio(RingBuffer,SAMPLE_COUNT,settings.aica.LimitFPS);
|
||||
bool do_wait = settings.aica.LimitFPS && (mspdf <= 11);
|
||||
|
||||
PushAudio(RingBuffer,SAMPLE_COUNT, do_wait);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue