diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-07-10 06:54:11 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-07-10 06:54:11 +0000 |
| commit | f7823bc1646f1885bd9a0a19a9645c0e2cb884bd (patch) | |
| tree | 15f115383205088b3fca3f4c41a319e1da183ac7 /plugins/dfsound/spu.c | |
| parent | fcf4fb0933140db08c7bc094abc9edb271c13359 (diff) | |
| download | pcsxr-f7823bc1646f1885bd9a0a19a9645c0e2cb884bd.tar.gz | |
I was really stupid... just use libcdio and everything's fine, no need to deal with different OSes at all.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@54442 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfsound/spu.c')
| -rw-r--r-- | plugins/dfsound/spu.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index de57429d..bfaa69a3 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -107,7 +107,7 @@ static const int f[5][2] = { { 0, 0 }, int SSumR[NSSIZE]; int SSumL[NSSIZE]; int iFMod[NSSIZE]; -int iCycle=0; +int iCycle = 0; short * pS; int lastch=-1; // last channel processed on spu irq in timer mode @@ -442,9 +442,9 @@ static void *MAINThread(void *arg) { int s_1,s_2,fa,ns; #ifndef _MACOSX - int voldiv=iVolume; + int voldiv = iVolume; #else - const int voldiv=1; + const int voldiv = 2; #endif unsigned char * start;unsigned int nSample; int ch,predict_nr,shift_factor,flags,d,s; @@ -676,19 +676,19 @@ ENDX: ; if(iDisStereo) // no stereo? { - int dl,dr; - for(ns=0;ns<NSSIZE;ns++) + int dl, dr; + for (ns = 0; ns < NSSIZE; ns++) { - SSumL[ns]+=MixREVERBLeft(ns); + SSumL[ns] += MixREVERBLeft(ns); - dl=SSumL[ns]/voldiv;SSumL[ns]=0; - if(dl<-32767) dl=-32767;if(dl>32767) dl=32767; + dl = SSumL[ns] * 2 / voldiv; SSumL[ns] = 0; + if (dl < -32767) dl = -32767; if (dl > 32767) dl = 32767; - SSumR[ns]+=MixREVERBRight(); + SSumR[ns] += MixREVERBRight(); - dr=SSumR[ns]/voldiv;SSumR[ns]=0; - if(dr<-32767) dr=-32767;if(dr>32767) dr=32767; - *pS++=(dl+dr)/2; + dr = SSumR[ns] * 2 / voldiv; SSumR[ns] = 0; + if (dr < -32767) dr = -32767; if (dr > 32767) dr = 32767; + *pS++ = (dl + dr) / 2; } } else // stereo: @@ -696,13 +696,13 @@ ENDX: ; { SSumL[ns] += MixREVERBLeft(ns); - d = SSumL[ns] / voldiv; SSumL[ns] = 0; + d = SSumL[ns] * 2 / voldiv; SSumL[ns] = 0; if (d < -32767) d = -32767; if (d > 32767) d = 32767; *pS++ = d; SSumR[ns] += MixREVERBRight(); - d = SSumR[ns] / voldiv; SSumR[ns] = 0; + d = SSumR[ns] * 2 / voldiv; SSumR[ns] = 0; if(d < -32767) d = -32767; if(d > 32767) d = 32767; *pS++ = d; } |
