extern unsigned char * pSpuIrq;\r
extern unsigned char * pSpuBuffer;\r
\r
+#define regAreaGet(ch,offset) \\r
+ regArea[((ch<<4)|(offset))>>1]\r
+\r
// user settings\r
\r
extern int iVolume;\r
\r
for(ch=start;ch<end;ch++,val>>=1) // loop channels\r
{\r
- if((val&1) && s_chan[ch].pStart) // mmm... start has to be set before key on !?!\r
+ if((val&1) && regAreaGet(ch,6)) // mmm... start has to be set before key on !?!\r
{\r
s_chan[ch].bIgnoreLoop=0;\r
\r
// do this here, not in StartSound\r
// - fixes fussy timing issues\r
s_chan[ch].bStop=0;\r
- s_chan[ch].pCurr=s_chan[ch].pStart;\r
+ s_chan[ch].pCurr=spuMemC+((regAreaGet(ch,6)&~1)<<3); // must be block aligned\r
+ s_chan[ch].pLoop=spuMemC+((regAreaGet(ch,14)&~1)<<3);\r
\r
dwNewChannel|=(1<<ch); // bitfield for faster testing\r
dwChannelOn|=1<<ch;\r