X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fcdrom.c;h=47e403751f9e028d10e923d23efa3a3fe4658916;hp=4e312fd69082055024b948016d4c64d9d4bb2c6d;hb=f4627eb3cb482fa3786b63e9ff4c9723ac792ce1;hpb=91f412c2959e77ea744a13b0592020c50982c623 diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 4e312fd6..47e40375 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -46,6 +46,7 @@ cdrStruct cdr; static unsigned char *pTransfer; +static s16 read_buf[CD_FRAMESIZE_RAW/2]; /* CD-ROM magic numbers */ #define CdlSync 0 /* nocash documentation : "Uh, actually, returns error code 40h = Invalid Command...?" */ @@ -434,8 +435,7 @@ static void cdrPlayInterrupt_Autopause() u32 abs_lev_max = 0; boolean abs_lev_chselect; u32 i; - s16 read_buf[CD_FRAMESIZE_RAW/2]; - + if ((cdr.Mode & MODE_AUTOPAUSE) && cdr.TrackChanged) { CDR_LOG( "CDDA STOP\n" ); @@ -452,7 +452,6 @@ static void cdrPlayInterrupt_Autopause() } else if (cdr.Mode & MODE_REPORT) { CDR_readCDDA(cdr.SetSectorPlay[0], cdr.SetSectorPlay[1], cdr.SetSectorPlay[2], (u8 *)read_buf); - cdr.Result[0] = cdr.StatP; cdr.Result[1] = cdr.subq.Track; cdr.Result[2] = cdr.subq.Index; @@ -533,6 +532,12 @@ void cdrPlayInterrupt() cdrPlayInterrupt_Autopause(); if (!cdr.Play) return; + + if (CDR_readCDDA && !cdr.Muted && cdr.Mode & MODE_REPORT) { + cdrAttenuate((u8 *)read_buf, CD_FRAMESIZE_RAW / 4, 1); + if (SPU_playCDDAchannel) + SPU_playCDDAchannel((u8 *)read_buf, CD_FRAMESIZE_RAW); + } cdr.SetSectorPlay[2]++; if (cdr.SetSectorPlay[2] == 75) {