X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fspu.c;h=9300a16cc1672b3796863f3205f4833f9675f1a9;hb=b34d6a805a50ee4a897b0a53bbc0b89e3eb7f72e;hp=283d598867415ce46606e7cf91164816bd7beabc;hpb=dc3178e9ced416632e8b5b5486bb35a561a6b2b9;p=pcsx_rearmed.git diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 283d5988..9300a16c 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -1286,7 +1286,7 @@ void schedule_next_irq(void) 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(); @@ -1328,6 +1328,7 @@ void CALLBACK SPUplayADPCMchannel(xa_decode_t *xap, unsigned int cycle, int is_s 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 @@ -1339,7 +1340,8 @@ int CALLBACK SPUplayCDDAchannel(short *pcm, int nbytes, unsigned int cycle, int 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 @@ -1361,7 +1363,7 @@ static void SetupStreams(void) 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;