diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-11-01 09:22:13 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-11-01 09:22:13 +0000 |
| commit | 69840b25a2e8331f0619d5a087204ae44af9ae9e (patch) | |
| tree | c854b486612b5a83ac2d452f6031828610b5a89f | |
| parent | beeda82240cb6ef2c9a093fc6db8a03976001ff1 (diff) | |
| download | pcsxr-69840b25a2e8331f0619d5a087204ae44af9ae9e.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34499 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | ChangeLog | 1 | ||||
| -rw-r--r-- | macosx/Pcsx.xcodeproj/project.pbxproj | 6 | ||||
| -rw-r--r-- | plugins/dfsound/xa.c | 14 |
3 files changed, 18 insertions, 3 deletions
@@ -5,6 +5,7 @@ November 1, 2009 Wei Mingzhi <weimingzhi@gmail.com> files for building existing dfsound sources for Mac OS X. * plugins/dfsound/stdafx.h: Made necessary changes for Mac OS X build. * plugins/dfsound/spu.c: Likewise. + * plugins/dfsound/xa.c: Likewise. October 31, 2009 Wei Mingzhi <weimingzhi@gmail.com> diff --git a/macosx/Pcsx.xcodeproj/project.pbxproj b/macosx/Pcsx.xcodeproj/project.pbxproj index ce1f0066..4b82ab54 100644 --- a/macosx/Pcsx.xcodeproj/project.pbxproj +++ b/macosx/Pcsx.xcodeproj/project.pbxproj @@ -139,7 +139,7 @@ 2BA44360052DB2EA00E21DDD /* PcsxPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxPlugin.h; sourceTree = "<group>"; }; 2BA44361052DB2EA00E21DDD /* PcsxPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxPlugin.m; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; }; 2BB3D6CF05427FE200831ACB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; }; - 2BB3D6D105427FE200831ACB /* PCSX.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = PCSX.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2BB3D6D105427FE200831ACB /* PCSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PCSX.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2BBB1126051DC00500B84448 /* PluginList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginList.h; sourceTree = "<group>"; }; 2BBB1127051DC00500B84448 /* PluginList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PluginList.m; sourceTree = "<group>"; }; 2BBB1787051E0D9700B84448 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = Credits.rtf; sourceTree = "<group>"; }; @@ -594,7 +594,7 @@ "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)", __MACOSX__, ); - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "PCSX_VERSION=\\\"1.5\\\""; + GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "PCSX_VERSION=\\\"1.5\\\" XA_HACK=1"; GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; GCC_WARN_UNKNOWN_PRAGMAS = NO; INFOPLIST_FILE = Info.plist; @@ -629,7 +629,7 @@ "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)", __MACOSX__, ); - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "PCSX_VERSION=\\\"1.5\\\""; + GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "PCSX_VERSION=\\\"1.5\\\" XA_HACK=1"; GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; GCC_WARN_UNKNOWN_PRAGMAS = NO; INFOPLIST_FILE = Info.plist; 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? |
