X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfsound%2Fregisters.c;h=983af8c91627829eefc29606b44385ca3bd90167;hp=c7905255c00af328ff7cee8fe490548cdebd7b41;hb=77d6fd631e4c4efc26333ae43888855b9961493e;hpb=5238f6f8fcf43fb8506467b358ee976a8c5fdf6b diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c index c7905255..983af8c9 100644 --- a/plugins/dfsound/registers.c +++ b/plugins/dfsound/registers.c @@ -22,7 +22,6 @@ #include "externals.h" #include "registers.h" #include "regs.h" -#include "reverb.h" /* // adsr time values (in ms) by James Higgs ... see the end of @@ -170,6 +169,7 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val) s_chan[ch].pLoop=spuMemC+((unsigned long)((val<<3)&~0xf)); //s_chan[ch].bIgnoreLoop=1; //ReleaseMutex(s_chan[ch].hMutex); // -> oki, on with the thread + dwChannelDead&=~(1<>4)-0xc0; - if(s_chan[ch].pLoop==NULL) return 0; return (unsigned short)((s_chan[ch].pLoop-spuMemC)>>3); } } @@ -425,17 +419,19 @@ void SoundOn(int start,int end,unsigned short val) // SOUND ON PSX COMAND for(ch=start;ch>=1) // loop channels { - if((val&1) && s_chan[ch].pStart) // mmm... start has to be set before key on !?! + if((val&1) && regAreaGet(ch,6)) // mmm... start has to be set before key on !?! { s_chan[ch].bIgnoreLoop=0; // do this here, not in StartSound // - fixes fussy timing issues s_chan[ch].bStop=0; - s_chan[ch].pCurr=s_chan[ch].pStart; + s_chan[ch].pCurr=spuMemC+((regAreaGet(ch,6)&~1)<<3); // must be block aligned + s_chan[ch].pLoop=spuMemC+((regAreaGet(ch,14)&~1)<<3); dwNewChannel|=(1< turn off fmod + if(ch>0&&s_chan[ch-1].bFMod==2) + s_chan[ch-1].bFMod=0; } } }