X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fregisters.c;h=6b62247f8b3e5b370a16d6e3545351e56225914f;hb=5fdcf5cd320abef2c685630e3edf3598645d141e;hp=e0693064db57616b716464fdd304ec2d1359f42b;hpb=b64fb8912577f6f1e856bf255b6bd96e4e977203;p=pcsx_rearmed.git diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c index e0693064..6b62247f 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); @@ -350,7 +350,7 @@ static void SoundOn(int start,int end,unsigned short val) for(ch=start;ch>=1) // loop channels { - if((val&1) && regAreaGet(ch,6)) // mmm... start has to be set before key on !?! + if((val&1) && regAreaGetCh(ch, 6)) // mmm... start has to be set before key on !?! { spu.s_chan[ch].bIgnoreLoop = 0; spu.dwNewChannel|=(1<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); } ////////////////////////////////////////////////////////////////////////