break;\r
//------------------------------------------------// start\r
case 6: \r
- s_chan[ch].pStart=spuMemC+((unsigned long) val<<3);\r
+ // Brain Dead 13 - align to 16 boundary\r
+ s_chan[ch].pStart= spuMemC+(unsigned long)((val<<3)&~0xf);\r
break;\r
//------------------------------------------------// level with pre-calcs\r
case 8:\r
//------------------------------------------------//\r
case 14: // loop?\r
//WaitForSingleObject(s_chan[ch].hMutex,2000); // -> no multithread fuckups\r
- s_chan[ch].pLoop=spuMemC+((unsigned long) val<<3);\r
+ s_chan[ch].pLoop=spuMemC+((unsigned long)((val<<3)&~0xf));\r
s_chan[ch].bIgnoreLoop=1;\r
//ReleaseMutex(s_chan[ch].hMutex); // -> oki, on with the thread\r
break;\r
{\r
s_chan[ch].bIgnoreLoop=0;\r
s_chan[ch].bNew=1;\r
+\r
+ // do this here, not in StartSound\r
+ // - fixes fussy timing issues\r
+ s_chan[ch].bStop=0;\r
+ s_chan[ch].bOn=1;\r
+ s_chan[ch].pCurr=s_chan[ch].pStart;\r
+\r
dwNewChannel|=(1<<ch); // bitfield for faster testing\r
}\r
}\r
if(val&1) // && s_chan[i].bOn) mmm...\r
{\r
s_chan[ch].bStop=1;\r
+\r
+ // Jungle Book - Rhythm 'n Groove\r
+ // - turns off buzzing sound (loop hangs)\r
+ s_chan[ch].bNew=0;\r
+ dwNewChannel &= ~(1<<ch);\r
} \r
}\r
}\r
StartADSR(ch);
StartREVERB(ch);
- s_chan[ch].pCurr=s_chan[ch].pStart; // set sample start
+ // fussy timing issues - do in VoiceOn
+ //s_chan[ch].pCurr=s_chan[ch].pStart; // set sample start
+ //s_chan[ch].bStop=0;
+ //s_chan[ch].bOn=1;
s_chan[ch].s_1=0; // init mixing vars
s_chan[ch].s_2=0;
s_chan[ch].iSBPos=28;
s_chan[ch].bNew=0; // init channel flags
- s_chan[ch].bStop=0;
- s_chan[ch].bOn=1;
s_chan[ch].SB[29]=0; // init our interpolation helpers
s_chan[ch].SB[30]=0;