X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fregisters.c;h=eba40158f7b4c3d9fd0f098a2e422a86d64a91ba;hb=5aa94fa080e1b0a661b23aa912022dd464d41110;hp=e0693064db57616b716464fdd304ec2d1359f42b;hpb=b64fb8912577f6f1e856bf255b6bd96e4e977203;p=pcsx_rearmed.git diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c index e0693064..eba40158 100644 --- a/plugins/dfsound/registers.c +++ b/plugins/dfsound/registers.c @@ -296,7 +296,7 @@ unsigned short CALLBACK SPUreadRegister(unsigned long reg) { const int ch=(r>>4)-0xc0; if(spu.dwNewChannel&(1<>16); @@ -484,11 +484,14 @@ static void SetPitch(int ch,unsigned short val) // SET PITCH if(val>0x3fff) NP=0x3fff; // get pitch val else NP=val; - spu.s_chan[ch].iRawPitch=NP; - spu.s_chan[ch].sinc=(NP<<4)|8; - spu.s_chan[ch].sinc_inv=0; - if (spu_config.iUseInterpolation == 1) - spu.SB[ch * SB_SIZE + 32] = 1; // -> freq change in simple interpolation mode: set flag + spu.s_chan[ch].iRawPitch = NP; + spu.s_chan[ch].sinc = NP << 4; + spu.s_chan[ch].sinc_inv = 0; + spu.SB[ch * SB_SIZE + 32] = 1; // -> freq change in simple interpolation mode: set flag + if (val) + spu.dwChannelsAudible |= 1u << ch; + else + spu.dwChannelsAudible &= ~(1u << ch); } ////////////////////////////////////////////////////////////////////////