void CALLBACK SPUasync(unsigned int cycle, unsigned int flags)
{
- do_samples(cycle, spu_config.iUseFixedUpdates);
+ do_samples(cycle, 0);
if (spu.spuCtrl & CTRL_IRQ)
schedule_next_irq();
do_samples(cycle, 1); // catch up to prevent source underflows later
FeedXA(xap); // call main XA feeder
+ spu.xapGlobal = xap; // store info for save states
}
// CDDA AUDIO
if (is_start)
do_samples(cycle, 1); // catch up to prevent source underflows later
- return FeedCDDA((unsigned char *)pcm, nbytes);
+ FeedCDDA((unsigned char *)pcm, nbytes);
+ return 0;
}
// to be called after state load
spu.XAFeed = spu.XAStart;
spu.CDDAStart = malloc(CDDA_BUFFER_SIZE); // alloc cdda buffer
- spu.CDDAEnd = spu.CDDAStart + 16384;
+ spu.CDDAEnd = spu.CDDAStart + CDDA_BUFFER_SIZE / sizeof(uint32_t);
spu.CDDAPlay = spu.CDDAStart;
spu.CDDAFeed = spu.CDDAStart;