X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfsound%2Fexternals.h;h=0ddf40672541648c94d35210d210f5051e5b9653;hp=92683a95d09db40bfd47a6a4aeaf1f3f7557c6ec;hb=77d6fd631e4c4efc26333ae43888855b9961493e;hpb=6d866bb7894b252fc430a24a97769511d5ead1ca diff --git a/plugins/dfsound/externals.h b/plugins/dfsound/externals.h index 92683a95..0ddf4067 100644 --- a/plugins/dfsound/externals.h +++ b/plugins/dfsound/externals.h @@ -45,7 +45,9 @@ #define MAXCHAN 24 // ~ 1 ms of data -#define NSSIZE 45 +// note: must be even due to the way reverb works now +#define FRAG_MSECS 2 +#define NSSIZE ((44100 * FRAG_MSECS / 1000 + 1) & ~1) /////////////////////////////////////////////////////////// // struct defines @@ -120,17 +122,10 @@ typedef struct int iUsedFreq; // current pc pitch int iLeftVolume; // left volume int iRightVolume; // right volume - int s_1; // last decoding infos - int s_2; ADSRInfoEx ADSRX; int iRawPitch; // raw pitch (0...3fff) - int iRVBOffset; // reverb offset - int iRVBRepeat; // reverb repeat - int iRVBNum; // another reverb helper - int iOldNoise; // old noise val for this channel - - int SB[32+32]; + int SB[32+4]; } SPUCHAN; /////////////////////////////////////////////////////////// @@ -142,8 +137,6 @@ typedef struct int VolLeft; int VolRight; - int iLastRVBLeft; - int iLastRVBRight; int iRVBLeft; int iRVBRight; @@ -179,6 +172,17 @@ typedef struct int MIX_DEST_B1; // (offset) int IN_COEF_L; // (coef.) int IN_COEF_R; // (coef.) + + int dirty; // registers changed + + // normalized offsets + int nIIR_DEST_A0, nIIR_DEST_A1, nIIR_DEST_B0, nIIR_DEST_B1, + nACC_SRC_A0, nACC_SRC_A1, nACC_SRC_B0, nACC_SRC_B1, + nIIR_SRC_A0, nIIR_SRC_A1, nIIR_SRC_B0, nIIR_SRC_B1, + nACC_SRC_C0, nACC_SRC_C1, nACC_SRC_D0, nACC_SRC_D1, + nMIX_DEST_A0, nMIX_DEST_A1, nMIX_DEST_B0, nMIX_DEST_B1; + // MIX_DEST_xx - FB_SRC_x + int nFB_SRC_A0, nFB_SRC_A1, nFB_SRC_B0, nFB_SRC_B1; } REVERBInfo; /////////////////////////////////////////////////////////// @@ -195,6 +199,9 @@ extern unsigned char * spuMemC; extern unsigned char * pSpuIrq; extern unsigned char * pSpuBuffer; +#define regAreaGet(ch,offset) \ + regArea[((ch<<4)|(offset))>>1] + // user settings extern int iVolume; @@ -205,7 +212,6 @@ extern int iDebugMode; extern int iRecordMode; extern int iUseReverb; extern int iUseInterpolation; -extern int iDisStereo; // MISC extern int iSpuAsyncWait; @@ -223,6 +229,8 @@ extern int bThreadEnded; extern int bSpuInit; extern unsigned int dwNewChannel; extern unsigned int dwChannelOn; +extern unsigned int dwPendingChanOff; +extern unsigned int dwChannelDead; extern int SSumR[]; extern int SSumL[]; @@ -268,8 +276,5 @@ extern int iRightXAVol; extern int * sRVBPlay; extern int * sRVBEnd; extern int * sRVBStart; -extern int iReverbOff; -extern int iReverbRepeat; -extern int iReverbNum; #endif