{\r
const int ch=(r>>4)-0xc0;\r
if(spu.dwNewChannel&(1<<ch)) return 1; // we are started, but not processed? return 1\r
- if((spu.dwChannelOn&(1<<ch)) && // same here... we haven't decoded one sample yet, so no envelope yet. return 1 as well\r
+ if((spu.dwChannelsAudible&(1<<ch)) && // same here... we haven't decoded one sample yet, so no envelope yet. return 1 as well\r
!spu.s_chan[ch].ADSRX.EnvelopeVol)\r
return 1;\r
return (unsigned short)(spu.s_chan[ch].ADSRX.EnvelopeVol>>16);\r
if(val>0x3fff) NP=0x3fff; // get pitch val\r
else NP=val;\r
\r
- spu.s_chan[ch].iRawPitch=NP;\r
- spu.s_chan[ch].sinc=(NP<<4)|8;\r
- spu.s_chan[ch].sinc_inv=0;\r
- if (spu_config.iUseInterpolation == 1)\r
- spu.SB[ch * SB_SIZE + 32] = 1; // -> freq change in simple interpolation mode: set flag\r
+ spu.s_chan[ch].iRawPitch = NP;\r
+ spu.s_chan[ch].sinc = NP << 4;\r
+ spu.s_chan[ch].sinc_inv = 0;\r
+ spu.SB[ch * SB_SIZE + 32] = 1; // -> freq change in simple interpolation mode: set flag\r
+ if (val)\r
+ spu.dwChannelsAudible |= 1u << ch;\r
+ else\r
+ spu.dwChannelsAudible &= ~(1u << ch);\r
}\r
\r
////////////////////////////////////////////////////////////////////////\r