X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fxa.c;h=397ed592f7dd2b61043bb3ddffbc526c4cf6a5e7;hb=991a1e8753d355b438b8f5efb617cb28239ca8d5;hp=c416d19a72adfc2cb47240a47f10e1381990e533;hpb=b3ddf04a04cb6308093c1ef494961912820aa08d;p=pcsx_rearmed.git diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c index c416d19a..397ed592 100644 --- a/plugins/dfsound/xa.c +++ b/plugins/dfsound/xa.c @@ -16,6 +16,7 @@ ***************************************************************************/ #include "stdafx.h" +#include "spu.h" #define _IN_XA #include @@ -60,8 +61,8 @@ INLINE void MixXA(int *SSumLR, int ns_to, int decode_pos) SSumLR[ns++] += l; SSumLR[ns++] += r; - spu.spuMem[cursor] = v; - spu.spuMem[cursor + 0x400/2] = v >> 16; + spu.spuMem[cursor] = HTOLE16(v); + spu.spuMem[cursor + 0x400/2] = HTOLE16(v >> 16); cursor = (cursor + 1) & 0x1ff; } spu.XALastVal = v; @@ -80,8 +81,8 @@ INLINE void MixXA(int *SSumLR, int ns_to, int decode_pos) SSumLR[ns++] += l; SSumLR[ns++] += r; - spu.spuMem[cursor] = v; - spu.spuMem[cursor + 0x400/2] = v >> 16; + spu.spuMem[cursor] = HTOLE16(v); + spu.spuMem[cursor + 0x400/2] = HTOLE16(v >> 16); cursor = (cursor + 1) & 0x1ff; } spu.XALastVal = v; @@ -94,6 +95,7 @@ INLINE void MixXA(int *SSumLR, int ns_to, int decode_pos) // small linux time helper... only used for watchdog //////////////////////////////////////////////////////////////////////// +#if 0 static unsigned long timeGetTime_spu() { #if defined(NO_OS) @@ -106,6 +108,7 @@ static unsigned long timeGetTime_spu() return tv.tv_sec * 1000 + tv.tv_usec/1000; // to do that, but at least it works #endif } +#endif //////////////////////////////////////////////////////////////////////// // FEED XA @@ -118,7 +121,7 @@ INLINE void FeedXA(xa_decode_t *xap) if(!spu.bSPUIsOpen) return; spu.xapGlobal = xap; // store info for save states - spu.XARepeat = 100; // set up repeat + spu.XARepeat = 3; // set up repeat #if 0//def XA_HACK iSize=((45500*xap->nsamples)/xap->freq); // get size @@ -133,6 +136,7 @@ INLINE void FeedXA(xa_decode_t *xap) if(iPlace==0) return; // no place at all //----------------------------------------------------// +#if 0 if(spu_config.iXAPitch) // pitch change option? { static DWORD dwLT=0; @@ -169,6 +173,7 @@ INLINE void FeedXA(xa_decode_t *xap) if(iLastSize) iSize=iLastSize; } } +#endif //----------------------------------------------------// spos=0x10000L; @@ -179,6 +184,7 @@ INLINE void FeedXA(xa_decode_t *xap) uint32_t * pS=(uint32_t *)xap->pcm; uint32_t l=0; +#if 0 if(spu_config.iXAPitch) { int32_t l1,l2;short s; @@ -238,6 +244,7 @@ INLINE void FeedXA(xa_decode_t *xap) } } else +#endif { for(i=0;ipcm; uint32_t l;short s=0; +#if 0 if(spu_config.iXAPitch) { int32_t l1; @@ -337,6 +345,7 @@ INLINE void FeedXA(xa_decode_t *xap) } } else +#endif { for(i=0;i