From 4d55a8b8254dff61fdc7b1959f6aef7eafbd9439 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Wed, 9 Nov 2011 20:49:54 +0000 Subject: Patch 10767 (Durandal_1707). git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72138 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfsound/adsr.c | 4 ++-- plugins/dfsound/adsr.h | 4 ++-- plugins/dfsound/cfg.h | 2 ++ plugins/dfsound/reverb.c | 18 +++++++++--------- plugins/dfsound/reverb.h | 4 ++-- plugins/dfsound/spu.c | 18 +++++++++--------- plugins/dfsound/xa.c | 8 +++++--- plugins/dfsound/xa.h | 6 +++--- 8 files changed, 34 insertions(+), 30 deletions(-) (limited to 'plugins/dfsound') diff --git a/plugins/dfsound/adsr.c b/plugins/dfsound/adsr.c index f75a5127..4eb3748c 100644 --- a/plugins/dfsound/adsr.c +++ b/plugins/dfsound/adsr.c @@ -142,7 +142,7 @@ void InitADSR(void) // INIT ADSR //////////////////////////////////////////////////////////////////////// -INLINE void StartADSR(int ch) // MIX ADSR +void StartADSR(int ch) // MIX ADSR { s_chan[ch].ADSRX.lVolume=1; // and init some adsr vars s_chan[ch].ADSRX.State=0; @@ -152,7 +152,7 @@ INLINE void StartADSR(int ch) // MIX ADSR //////////////////////////////////////////////////////////////////////// -INLINE int MixADSR(int ch) // MIX ADSR +int MixADSR(int ch) // MIX ADSR { int EnvelopeVol = s_chan[ch].ADSRX.EnvelopeVol; int EnvelopeVol_f = s_chan[ch].ADSRX.EnvelopeVol_f; diff --git a/plugins/dfsound/adsr.h b/plugins/dfsound/adsr.h index ff2af1ff..a99fc90c 100644 --- a/plugins/dfsound/adsr.h +++ b/plugins/dfsound/adsr.h @@ -15,5 +15,5 @@ * * ***************************************************************************/ -INLINE void StartADSR(int ch); -INLINE int MixADSR(int ch); +void StartADSR(int ch); +int MixADSR(int ch); diff --git a/plugins/dfsound/cfg.h b/plugins/dfsound/cfg.h index b052b2d9..d26c116e 100644 --- a/plugins/dfsound/cfg.h +++ b/plugins/dfsound/cfg.h @@ -20,6 +20,8 @@ void ReadConfig(void); #ifdef _WINDOWS BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); BOOL CALLBACK DSoundDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +#elif defined (_MACOSX) +#include "maccfg.h" #else void StartCfgTool(char * pCmdLine); #endif diff --git a/plugins/dfsound/reverb.c b/plugins/dfsound/reverb.c index ce119621..bd20f3e5 100644 --- a/plugins/dfsound/reverb.c +++ b/plugins/dfsound/reverb.c @@ -63,7 +63,7 @@ void SetREVERB(unsigned short val) // START REVERB //////////////////////////////////////////////////////////////////////// -INLINE void StartREVERB(int ch) +void StartREVERB(int ch) { if(s_chan[ch].bReverb && (spuCtrl&0x80)) // reverb possible? { @@ -84,7 +84,7 @@ INLINE void StartREVERB(int ch) // HELPER FOR NEILL'S REVERB: re-inits our reverb mixing buf //////////////////////////////////////////////////////////////////////// -INLINE void InitREVERB(void) +static INLINE void InitREVERB(void) { if(iUseReverb==2) {memset(sRVBStart,0,NSSIZE*2*4);} @@ -94,7 +94,7 @@ INLINE void InitREVERB(void) // STORE REVERB //////////////////////////////////////////////////////////////////////// -INLINE void StoreREVERB_CD(int left, int right,int ns) +static INLINE void StoreREVERB_CD(int left, int right,int ns) { if(iUseReverb==0) return; else @@ -112,7 +112,7 @@ INLINE void StoreREVERB_CD(int left, int right,int ns) } -INLINE void StoreREVERB(int ch,int ns) +void StoreREVERB(int ch,int ns) { if(iUseReverb==0) return; else @@ -149,7 +149,7 @@ INLINE void StoreREVERB(int ch,int ns) //////////////////////////////////////////////////////////////////////// -INLINE int g_buffer(int iOff) // get_buffer content helper: takes care about wraps +static INLINE int g_buffer(int iOff) // get_buffer content helper: takes care about wraps { short * p=(short *)spuMem; iOff=(iOff*4)+rvb.CurrAddr; @@ -160,7 +160,7 @@ INLINE int g_buffer(int iOff) // get_buffer content hel //////////////////////////////////////////////////////////////////////// -INLINE void s_buffer(int iOff,int iVal) // set_buffer content helper: takes care about wraps and clipping +static INLINE void s_buffer(int iOff,int iVal) // set_buffer content helper: takes care about wraps and clipping { short * p=(short *)spuMem; iOff=(iOff*4)+rvb.CurrAddr; @@ -172,7 +172,7 @@ INLINE void s_buffer(int iOff,int iVal) // set_buffer content hel //////////////////////////////////////////////////////////////////////// -INLINE void s_buffer1(int iOff,int iVal) // set_buffer (+1 sample) content helper: takes care about wraps and clipping +static INLINE void s_buffer1(int iOff,int iVal) // set_buffer (+1 sample) content helper: takes care about wraps and clipping { short * p=(short *)spuMem; iOff=(iOff*4)+rvb.CurrAddr+1; @@ -184,7 +184,7 @@ INLINE void s_buffer1(int iOff,int iVal) // set_buffer (+1 sample //////////////////////////////////////////////////////////////////////// -INLINE int MixREVERBLeft(int ns) +static INLINE int MixREVERBLeft(int ns) { if(iUseReverb==0) return 0; else @@ -291,7 +291,7 @@ INLINE int MixREVERBLeft(int ns) //////////////////////////////////////////////////////////////////////// -INLINE int MixREVERBRight(void) +static INLINE int MixREVERBRight(void) { if(iUseReverb==0) return 0; else diff --git a/plugins/dfsound/reverb.h b/plugins/dfsound/reverb.h index ce618187..ea0a1a2d 100644 --- a/plugins/dfsound/reverb.h +++ b/plugins/dfsound/reverb.h @@ -16,6 +16,6 @@ ***************************************************************************/ void SetREVERB(unsigned short val); -INLINE void StartREVERB(int ch); -INLINE void StoreREVERB(int ch,int ns); +void StartREVERB(int ch); +void StoreREVERB(int ch,int ns); diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index e646e226..304297db 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -188,7 +188,7 @@ static int iSecureStart=0; // secure start counter // -INLINE void InterpolateUp(int ch) +static INLINE void InterpolateUp(int ch) { if(s_chan[ch].SB[32]==1) // flag == 1? calc step and set flag... and don't change the value in this pass { @@ -236,7 +236,7 @@ INLINE void InterpolateUp(int ch) // even easier interpolation on downsampling, also no special filter, again just "Pete's common sense" tm // -INLINE void InterpolateDown(int ch) +static INLINE void InterpolateDown(int ch) { if(s_chan[ch].sinc>=0x20000L) // we would skip at least one val? { @@ -262,7 +262,7 @@ INLINE void InterpolateDown(int ch) // START SOUND... called by main thread to setup a new sound on a channel //////////////////////////////////////////////////////////////////////// -INLINE void StartSound(int ch) +static INLINE void StartSound(int ch) { StartADSR(ch); StartREVERB(ch); @@ -292,7 +292,7 @@ INLINE void StartSound(int ch) // ALL KIND OF HELPERS //////////////////////////////////////////////////////////////////////// -INLINE void VoiceChangeFrequency(int ch) +static INLINE void VoiceChangeFrequency(int ch) { s_chan[ch].iUsedFreq=s_chan[ch].iActFreq; // -> take it and calc steps s_chan[ch].sinc=s_chan[ch].iRawPitch<<4; @@ -302,7 +302,7 @@ INLINE void VoiceChangeFrequency(int ch) //////////////////////////////////////////////////////////////////////// -INLINE void FModChangeFrequency(int ch,int ns) +static INLINE void FModChangeFrequency(int ch,int ns) { int NP=s_chan[ch].iRawPitch; @@ -366,7 +366,7 @@ unsigned short NoiseFreqAdd[5] = { 0, 84, 140, 180, 210 }; -INLINE void NoiseClock() +static INLINE void NoiseClock() { unsigned int level; @@ -392,7 +392,7 @@ INLINE void NoiseClock() } } -INLINE int iGetNoiseVal(int ch) +static INLINE int iGetNoiseVal(int ch) { int fa; @@ -413,7 +413,7 @@ INLINE int iGetNoiseVal(int ch) //////////////////////////////////////////////////////////////////////// -INLINE void StoreInterpolationVal(int ch,int fa) +static INLINE void StoreInterpolationVal(int ch,int fa) { /* // fmod channel = sound output @@ -451,7 +451,7 @@ INLINE void StoreInterpolationVal(int ch,int fa) //////////////////////////////////////////////////////////////////////// -INLINE int iGetInterpolationVal(int ch) +static INLINE int iGetInterpolationVal(int ch) { int fa; diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c index 20b6802a..4f78eb00 100644 --- a/plugins/dfsound/xa.c +++ b/plugins/dfsound/xa.c @@ -45,6 +45,7 @@ uint32_t * CDDAEnd = NULL; int iLeftXAVol = 0x8000; int iRightXAVol = 0x8000; +#if 0 static int gauss_ptr = 0; static int gauss_window[8] = {0, 0, 0, 0, 0, 0, 0, 0}; @@ -52,6 +53,7 @@ static int gauss_window[8] = {0, 0, 0, 0, 0, 0, 0, 0}; #define gvall(x) gauss_window[(gauss_ptr+x)&3] #define gvalr0 gauss_window[4+gauss_ptr] #define gvalr(x) gauss_window[4+((gauss_ptr+x)&3)] +#endif long cdxa_dbuf_ptr; @@ -62,7 +64,7 @@ long cdxa_dbuf_ptr; static int lastxa_lc, lastxa_rc; static int lastcd_lc, lastcd_rc; -INLINE void MixXA(void) +void MixXA(void) { int ns; int lc,rc; @@ -260,7 +262,7 @@ unsigned long timeGetTime_spu() // FEED XA //////////////////////////////////////////////////////////////////////// -INLINE void FeedXA(xa_decode_t *xap) +void FeedXA(xa_decode_t *xap) { int sinc,spos,i,iSize,iPlace; @@ -451,7 +453,7 @@ INLINE void FeedXA(xa_decode_t *xap) unsigned int cdda_ptr; -INLINE void FeedCDDA(unsigned char *pcm, int nBytes) +void FeedCDDA(unsigned char *pcm, int nBytes) { while(nBytes>0) { diff --git a/plugins/dfsound/xa.h b/plugins/dfsound/xa.h index 0928eba2..90b89f41 100644 --- a/plugins/dfsound/xa.h +++ b/plugins/dfsound/xa.h @@ -15,6 +15,6 @@ * * ***************************************************************************/ -INLINE void MixXA(void); -INLINE void FeedXA(xa_decode_t *xap); -INLINE void FeedCDDA(unsigned char *pcm, int nBytes); +void MixXA(void); +void FeedXA(xa_decode_t *xap); +void FeedCDDA(unsigned char *pcm, int nBytes); -- cgit v1.2.3