{\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
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