summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-06-29 12:48:12 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-06-29 12:48:12 +0000
commit032f74dd1a205a3e2d032e0d0deb60eac8b42de4 (patch)
tree362cc2b7c1b4e0a6f21466aea1671fc905bbc66f /plugins
parentbf555e061aaf87c519c402db51472a39a409841a (diff)
downloadpcsxr-032f74dd1a205a3e2d032e0d0deb60eac8b42de4.tar.gz
implemented cheat search
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@23829 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfsound/alsa.c4
-rw-r--r--plugins/dfsound/spu.c34
2 files changed, 18 insertions, 20 deletions
diff --git a/plugins/dfsound/alsa.c b/plugins/dfsound/alsa.c
index 5daa2857..e9ea0a3b 100644
--- a/plugins/dfsound/alsa.c
+++ b/plugins/dfsound/alsa.c
@@ -145,8 +145,8 @@ unsigned long SoundGetBytesBuffered(void)
if (handle == NULL) // failed to open?
return SOUNDSIZE;
l = snd_pcm_avail_update(handle);
- if(l < 0) return 0;
- if(l < buffer_size / 2) // can we write in at least the half of fragments?
+ if (l < 0) return 0;
+ if (l < buffer_size / 2) // can we write in at least the half of fragments?
l = SOUNDSIZE; // -> no? wait
else l = 0; // -> else go on
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c
index ce697382..e1b0e099 100644
--- a/plugins/dfsound/spu.c
+++ b/plugins/dfsound/spu.c
@@ -23,7 +23,7 @@
#include "cfg.h"
#include "dsoundoss.h"
#include "regs.h"
-
+
#if defined(USEALSA)
static char * libraryName = "ALSA Sound";
#elif defined (USEOSS)
@@ -629,39 +629,37 @@ ENDX: ;
}
}
else // stereo:
- for(ns=0;ns<NSSIZE;ns++)
+ for (ns = 0; ns < NSSIZE; ns++)
{
- SSumL[ns]+=MixREVERBLeft(ns);
+ SSumL[ns] += MixREVERBLeft(ns);
- d=SSumL[ns]/voldiv;SSumL[ns]=0;
- if(d<-32767) d=-32767;if(d>32767) d=32767;
- *pS++=d;
+ d = SSumL[ns] / voldiv; SSumL[ns] = 0;
+ if (d < -32767) d = -32767; if (d > 32767) d = 32767;
+ *pS++ = d;
- SSumR[ns]+=MixREVERBRight();
+ SSumR[ns] += MixREVERBRight();
- d=SSumR[ns]/voldiv;SSumR[ns]=0;
- if(d<-32767) d=-32767;if(d>32767) d=32767;
- *pS++=d;
+ d = SSumR[ns] / voldiv; SSumR[ns] = 0;
+ if(d < -32767) d = -32767; if(d > 32767) d = 32767;
+ *pS++ = d;
}
InitREVERB();
// feed the sound
// wanna have around 1/60 sec (16.666 ms) updates
-
- if(iCycle++>8) //temp fix: lowered for low latency alsa configs
+ if (iCycle++ > 16)
{
- SoundFeedStreamData((unsigned char*)pSpuBuffer,
- ((unsigned char *)pS)-
- ((unsigned char *)pSpuBuffer));
- pS=(short *)pSpuBuffer;
- iCycle=0;
+ SoundFeedStreamData((unsigned char *)pSpuBuffer,
+ ((unsigned char *)pS) - ((unsigned char *)pSpuBuffer));
+ pS = (short *)pSpuBuffer;
+ iCycle = 0;
}
}
// end of big main loop...
- bThreadEnded=1;
+ bThreadEnded = 1;
return 0;
}