X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfsound%2Fexternals.h;h=bdf59566a2a6228d94c3018bfa53a876daa6bfca;hp=73134d07a20a23fb35b47323524eb50ced7436fd;hb=f8edb5bc279ba09aa7bc762da51236fd368827b0;hpb=1775933abd26d2e282c4e0b4093778d204a0038d diff --git a/plugins/dfsound/externals.h b/plugins/dfsound/externals.h index 73134d07..bdf59566 100644 --- a/plugins/dfsound/externals.h +++ b/plugins/dfsound/externals.h @@ -35,18 +35,13 @@ // spu defines //////////////////////////////////////////////////////////////////////// -// sound buffer sizes -// 400 ms complete sound buffer -#define SOUNDSIZE 70560 -// 137 ms test buffer... if less than that is buffered, a new upload will happen -#define TESTSIZE 24192 - // num of channels #define MAXCHAN 24 // ~ 1 ms of data // note: must be even due to the way reverb works now -#define NSSIZE 46 +#define FRAG_MSECS 2 +#define NSSIZE ((44100 * FRAG_MSECS / 1000 + 1) & ~1) /////////////////////////////////////////////////////////// // struct defines @@ -106,32 +101,22 @@ typedef struct int spos; int sinc; - unsigned char * pStart; // start ptr into sound mem unsigned char * pCurr; // current pos in sound mem unsigned char * pLoop; // loop ptr in sound mem unsigned int bStop:1; // is channel stopped (sample _can_ still be playing, ADSR Release phase) unsigned int bReverb:1; // can we do reverb on this channel? must have ctrl register bit, to get active - unsigned int bIgnoreLoop:1; // ignore loop bit, if an external loop address is used unsigned int bRVBActive:1; // reverb active flag unsigned int bNoise:1; // noise active flag unsigned int bFMod:2; // freq mod (0=off, 1=sound channel, 2=freq channel) + unsigned int bJump:1; // last decoded block jumped - int iActFreq; // current psx pitch - 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; /////////////////////////////////////////////////////////// @@ -205,11 +190,13 @@ 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; extern int iXAPitch; -extern int iUseTimer; extern int iSPUIRQWait; extern int iDebugMode; extern int iRecordMode; @@ -227,12 +214,11 @@ extern unsigned short spuCtrl; extern unsigned short spuStat; extern unsigned short spuIrq; extern unsigned long spuAddr; -extern int bEndThread; -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[];