summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-01 09:22:13 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-01 09:22:13 +0000
commit69840b25a2e8331f0619d5a087204ae44af9ae9e (patch)
treec854b486612b5a83ac2d452f6031828610b5a89f /plugins
parentbeeda82240cb6ef2c9a093fc6db8a03976001ff1 (diff)
downloadpcsxr-69840b25a2e8331f0619d5a087204ae44af9ae9e.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34499 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfsound/xa.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c
index cea1968f..fdae4f9e 100644
--- a/plugins/dfsound/xa.c
+++ b/plugins/dfsound/xa.c
@@ -65,8 +65,13 @@ INLINE void MixXA(void)
{
XALastVal=*XAPlay++;
if(XAPlay==XAEnd) XAPlay=XAStart;
+#ifdef XA_HACK
+ SSumL[ns]+=(((short)(XALastVal&0xffff)) * iLeftXAVol)/32768;
+ SSumR[ns]+=(((short)((XALastVal>>16)&0xffff)) * iRightXAVol)/32768;
+#else
SSumL[ns]+=(((short)(XALastVal&0xffff)) * iLeftXAVol)/32767;
SSumR[ns]+=(((short)((XALastVal>>16)&0xffff)) * iRightXAVol)/32767;
+#endif
}
if(XAPlay==XAFeed && XARepeat)
@@ -74,8 +79,13 @@ INLINE void MixXA(void)
XARepeat--;
for(;ns<NSSIZE;ns++)
{
+#ifdef XA_HACK
+ SSumL[ns]+=(((short)(XALastVal&0xffff)) * iLeftXAVol)/32768;
+ SSumR[ns]+=(((short)((XALastVal>>16)&0xffff)) * iRightXAVol)/32768;
+#else
SSumL[ns]+=(((short)(XALastVal&0xffff)) * iLeftXAVol)/32767;
SSumR[ns]+=(((short)((XALastVal>>16)&0xffff)) * iRightXAVol)/32767;
+#endif
}
}
@@ -112,7 +122,11 @@ INLINE void FeedXA(xa_decode_t *xap)
xapGlobal = xap; // store info for save states
XARepeat = 100; // set up repeat
+#ifdef XA_HACK
+ iSize=((45500*xap->nsamples)/xap->freq); // get size
+#else
iSize=((44100*xap->nsamples)/xap->freq); // get size
+#endif
if(!iSize) return; // none? bye
if(XAFeed<XAPlay) iPlace=XAPlay-XAFeed; // how much space in my buf?