X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfsound%2Fxa.c;h=e58bca2e923dd1f91e4803b4caa6cf00920d90e5;hp=af78acbeae8b528fa2ddafb309f11414de52365a;hb=2177c1ea9af71647a43a38d2277a7a68429d4f3c;hpb=efce366c5b6596b9542c4fe8c69695191dab5d5a diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c index af78acbe..e58bca2e 100644 --- a/plugins/dfsound/xa.c +++ b/plugins/dfsound/xa.c @@ -78,8 +78,9 @@ INLINE void MixXA(void) r = ((int)(short)(v >> 16) * iLeftXAVol) >> 15; SSumLR[ns++] += l; SSumLR[ns++] += r; - spuMem[cursor] = l; - spuMem[cursor + 0x400/2] = r; + + spuMem[cursor] = v; + spuMem[cursor + 0x400/2] = v >> 16; cursor = (cursor + 1) & 0x1ff; } XALastVal = v; @@ -94,8 +95,9 @@ INLINE void MixXA(void) r = ((int)(short)(v >> 16) * iLeftXAVol) >> 15; SSumLR[ns++] += l; SSumLR[ns++] += r; - spuMem[cursor] = l; - spuMem[cursor + 0x400/2] = r; + + spuMem[cursor] = v; + spuMem[cursor + 0x400/2] = v >> 16; cursor = (cursor + 1) & 0x1ff; } } @@ -104,7 +106,7 @@ INLINE void MixXA(void) // small linux time helper... only used for watchdog //////////////////////////////////////////////////////////////////////// -unsigned long timeGetTime_spu() +static unsigned long timeGetTime_spu() { struct timeval tv; gettimeofday(&tv, 0); // well, maybe there are better ways