diff options
| -rw-r--r-- | plugins/dfsound/registers.c | 13 | ||||
| -rw-r--r-- | plugins/dfsound/spu.c | 17 |
2 files changed, 18 insertions, 12 deletions
diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c index d8e1e66f..fbf20101 100644 --- a/plugins/dfsound/registers.c +++ b/plugins/dfsound/registers.c @@ -70,7 +70,8 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val) break;
//------------------------------------------------// start
case 6:
- s_chan[ch].pStart=spuMemC+((unsigned long) val<<3);
+ // Brain Dead 13 - align to 16 boundary
+ s_chan[ch].pStart= spuMemC+(unsigned long)((val<<3)&~0xf);
break;
//------------------------------------------------// level with pre-calcs
case 8:
@@ -429,13 +430,15 @@ void SoundOn(int start,int end,unsigned short val) // SOUND ON PSX COMAND s_chan[ch].bIgnoreLoop=0;
s_chan[ch].bNew=1;
- // ..?
+ // do this here, not in StartSound
+ // - fixes fussy timing issues
s_chan[ch].iSilent=0;
- //s_chan[ch].bStop=0;
+ s_chan[ch].bStop=0;
+ s_chan[ch].bOn=1;
+ s_chan[ch].pCurr=s_chan[ch].pStart;
// Final Fantasy 7 - don't do any of these
- //s_chan[ch].pLoop = spuMemC;
- //s_chan[ch].pLoop = 0;
+ // - sets loop address before VoiceOn
//s_chan[ch].pLoop = s_chan[ch].pStart;
dwNewChannel|=(1<<ch); // bitfield for faster testing
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index d6d5eecd..5a0f1787 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -258,16 +258,17 @@ INLINE void StartSound(int ch) { 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; @@ -628,10 +629,12 @@ static void *MAINThread(void *arg) // Xenogears - 7 = play missing sounds
start = s_chan[ch].pLoop;
- // (?) - silence flag (voice still plays)
- if( (flags&2) == 0 )
+ // (?) - silence flag (voice still plays?)
+ if( (flags&2) == 0 ) {
s_chan[ch].iSilent = 1;
+ s_chan[ch].iStop = 1;
//start = (unsigned char *) -1;
+ }
}
#if 0
@@ -699,7 +702,7 @@ GOON: ; ////////////////////////////////////////////// // ok, left/right sound volume (psx volume goes from 0 ... 0x3fff) - if(s_chan[ch].iMute || s_chan[ch].iSilent) + if(s_chan[ch].iMute)// || s_chan[ch].iSilent) s_chan[ch].sval=0; // debug mute else { |
