PCE: optimize 5ms
This commit is contained in:
parent
68a550a419
commit
43891b8d79
|
@ -78,7 +78,7 @@ inline void PCE_PSG::UpdateOutputSub(const int32_t timestamp, psg_channel *ch, c
|
|||
if (delta[0]) blip_add_delta(bb[0],timestamp,delta[0]);
|
||||
if (delta[1]) blip_add_delta(bb[1],timestamp,delta[1]);
|
||||
|
||||
ch->oscBuf->putSample(timestamp-ch->lasttsbase,CLAMP(samp0+samp1,-32768,32767));
|
||||
ch->oscBuf->putSample(timestamp,CLAMP(samp0+samp1,-32768,32767));
|
||||
|
||||
ch->blip_prev_samp[0] = samp0;
|
||||
ch->blip_prev_samp[1] = samp1;
|
||||
|
@ -409,13 +409,11 @@ PCE_PSG::PCE_PSG(int want_revision)
|
|||
bb[1]=NULL;
|
||||
|
||||
lastts = 0;
|
||||
lasttsbase = 0;
|
||||
for(int ch = 0; ch < 6; ch++)
|
||||
{
|
||||
channel[ch].blip_prev_samp[0] = 0;
|
||||
channel[ch].blip_prev_samp[1] = 0;
|
||||
channel[ch].lastts = 0;
|
||||
channel[ch].lasttsbase = 0;
|
||||
}
|
||||
|
||||
SetVolume(1.0); // Will build dbtable in the process.
|
||||
|
@ -753,11 +751,9 @@ void PCE_PSG::Update(int32_t timestamp)
|
|||
void PCE_PSG::ResetTS(int32_t ts_base)
|
||||
{
|
||||
lastts = ts_base;
|
||||
lasttsbase = ts_base;
|
||||
|
||||
for(int chc = 0; chc < 6; chc++) {
|
||||
channel[chc].lastts = ts_base;
|
||||
channel[chc].lasttsbase = ts_base;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ struct psg_channel
|
|||
int32_t samp_accum; // The result of adding up all the samples in the waveform buffer(part of an optimization for high-frequency playback).
|
||||
int32_t blip_prev_samp[2];
|
||||
int32_t lastts;
|
||||
int32_t lasttsbase;
|
||||
|
||||
uint16_t frequency; /* Channel frequency */
|
||||
uint8_t balance; /* Channel balance */
|
||||
|
@ -187,7 +186,6 @@ class PCE_PSG
|
|||
bool vol_pending;
|
||||
|
||||
int32_t lastts;
|
||||
int32_t lasttsbase;
|
||||
int revision;
|
||||
|
||||
int32_t dbtable_volonly[32];
|
||||
|
|
Loading…
Reference in a new issue