From cc585042cee679b5acb18b81f35a5571da812efd Mon Sep 17 00:00:00 2001 From: arcum42 Date: Fri, 5 Feb 2010 03:59:19 +0000 Subject: [PATCH] Spu2-x: A few quick changes to get it compiling in Linux again. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2562 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/Dma.cpp | 4 ++-- plugins/spu2-x/src/Global.h | 5 +++-- plugins/spu2-x/src/Linux/Alsa.cpp | 3 ++- plugins/spu2-x/src/Linux/Config.cpp | 3 ++- plugins/spu2-x/src/Linux/Config.h | 14 ++++++-------- plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp | 17 +++++++++-------- plugins/spu2-x/src/Linux/Dialogs.h | 5 +++-- plugins/spu2-x/src/Linux/SPU2-X.cbp | 4 ++-- plugins/spu2-x/src/Lowpass.cpp | 1 + plugins/spu2-x/src/Mixer.cpp | 2 +- plugins/spu2-x/src/ReadInput.cpp | 2 +- 11 files changed, 32 insertions(+), 28 deletions(-) diff --git a/plugins/spu2-x/src/Dma.cpp b/plugins/spu2-x/src/Dma.cpp index 53286f38b6..196e87dafc 100644 --- a/plugins/spu2-x/src/Dma.cpp +++ b/plugins/spu2-x/src/Dma.cpp @@ -16,7 +16,7 @@ */ #include "Global.h" -#include "dma.h" +#include "Dma.h" #include "PS2E-spu2.h" // temporary until I resolve cyclePtr/TimeUpdate dependencies. @@ -657,4 +657,4 @@ void V_Core::NewDmaInterrupt() //Regs.ATTR &= ~0x30; DmaStarted = false; #endif -} \ No newline at end of file +} diff --git a/plugins/spu2-x/src/Global.h b/plugins/spu2-x/src/Global.h index ee69ef9ce2..f8f6b5cd37 100644 --- a/plugins/spu2-x/src/Global.h +++ b/plugins/spu2-x/src/Global.h @@ -44,7 +44,8 @@ namespace soundtouch using std::string; using std::wstring; - + +#include "Pcsx2Defs.h" #include "Pcsx2Types.h" namespace VersionInfo @@ -110,4 +111,4 @@ extern void SysMessage(const wchar_t *fmt, ...); #include "Debug.h" #include "SndOut.h" -#endif \ No newline at end of file +#endif diff --git a/plugins/spu2-x/src/Linux/Alsa.cpp b/plugins/spu2-x/src/Linux/Alsa.cpp index 298cbdc9a8..1ec7a18d94 100644 --- a/plugins/spu2-x/src/Linux/Alsa.cpp +++ b/plugins/spu2-x/src/Linux/Alsa.cpp @@ -19,7 +19,8 @@ #include -#define ALSA_MEM_DEF +#define ALSA_MEM_DEF +#include "Global.h" #include "Alsa.h" #include "SndOut.h" diff --git a/plugins/spu2-x/src/Linux/Config.cpp b/plugins/spu2-x/src/Linux/Config.cpp index 79f14a2fb4..b5e802a1a5 100644 --- a/plugins/spu2-x/src/Linux/Config.cpp +++ b/plugins/spu2-x/src/Linux/Config.cpp @@ -15,8 +15,9 @@ * along with SPU2-X. If not, see . */ -#include "Spu2.h" +#include "Global.h" #include "Dialogs.h" +#include "Config.h" bool DebugEnabled=false; bool _MsgToConsole=false; diff --git a/plugins/spu2-x/src/Linux/Config.h b/plugins/spu2-x/src/Linux/Config.h index 05a10b56d2..76b9a25e8a 100644 --- a/plugins/spu2-x/src/Linux/Config.h +++ b/plugins/spu2-x/src/Linux/Config.h @@ -38,7 +38,7 @@ extern bool _CoresDump; extern bool _MemDump; extern bool _RegDump; -static __forceinline bool MsgToConsole() { return _MsgToConsole & DebugEnabled; } +/*static __forceinline bool MsgToConsole() { return _MsgToConsole & DebugEnabled; } static __forceinline bool MsgKeyOnOff() { return _MsgKeyOnOff & MsgToConsole(); } static __forceinline bool MsgVoiceOff() { return _MsgVoiceOff & MsgToConsole(); } @@ -53,7 +53,7 @@ static __forceinline bool WaveLog() { return _WaveLog & DebugEnabled; } static __forceinline bool CoresDump() { return _CoresDump & DebugEnabled; } static __forceinline bool MemDump() { return _MemDump & DebugEnabled; } -static __forceinline bool RegDump() { return _RegDump & DebugEnabled; } +static __forceinline bool RegDump() { return _RegDump & DebugEnabled; }*/ extern wchar_t AccessLogFileName[255]; @@ -80,7 +80,7 @@ extern bool dspPluginEnabled; extern bool timeStretchDisabled; extern bool StereoExpansionEnabled; -class SoundtouchCfg +namespace SoundtouchCfg { // Timestretch Slider Bounds, Min/Max static const int SequenceLen_Min = 30; @@ -92,16 +92,14 @@ class SoundtouchCfg static const int Overlap_Min = 3; static const int Overlap_Max = 15; -public: - static int SequenceLenMS; - static int SeekWindowMS; - static int OverlapMS; + static int SequenceLenMS = 63; + static int SeekWindowMS = 16; + static int OverlapMS = 7; static void ReadSettings(); static void WriteSettings(); static void OpenDialog( uptr hWnd ); -protected: static void ClampValues(); }; diff --git a/plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp b/plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp index be18a39d28..e7b8b5952f 100644 --- a/plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp +++ b/plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp @@ -19,20 +19,20 @@ * */ +#include "Global.h" #include "Dialogs.h" +#include "Config.h" -int SoundtouchCfg::SequenceLenMS = 63; -int SoundtouchCfg::SeekWindowMS = 16; -int SoundtouchCfg::OverlapMS = 7; - -void SoundtouchCfg::ClampValues() +namespace SoundtouchCfg +{ +void ClampValues() { Clampify( SequenceLenMS, SequenceLen_Min, SequenceLen_Max ); Clampify( SeekWindowMS, SeekWindow_Min, SeekWindow_Max ); Clampify( OverlapMS, Overlap_Min, Overlap_Max ); } -void SoundtouchCfg::ReadSettings() +void ReadSettings() { //SequenceLenMS = CfgReadInt( L"SOUNDTOUCH", L"SequenceLengthMS", 63 ); //SeekWindowMS = CfgReadInt( L"SOUNDTOUCH", L"SeekWindowMS", 16 ); @@ -41,7 +41,7 @@ void SoundtouchCfg::ReadSettings() ClampValues(); } -void SoundtouchCfg::WriteSettings() +void WriteSettings() { //CfgWriteInt( L"SOUNDTOUCH", L"SequenceLengthMS", SequenceLenMS ); //CfgWriteInt( L"SOUNDTOUCH", L"SeekWindowMS", SeekWindowMS ); @@ -52,6 +52,7 @@ void SoundtouchCfg::WriteSettings() { }*/ -void SoundtouchCfg::OpenDialog( uptr hWnd ) +void OpenDialog( uptr hWnd ) { } +} diff --git a/plugins/spu2-x/src/Linux/Dialogs.h b/plugins/spu2-x/src/Linux/Dialogs.h index d8266ff3bd..d19ad49f8e 100644 --- a/plugins/spu2-x/src/Linux/Dialogs.h +++ b/plugins/spu2-x/src/Linux/Dialogs.h @@ -18,6 +18,7 @@ #ifndef DIALOG_H_INCLUDED #define DIALOG_H_INCLUDED -#include "../Spu2.h" +#include "../Config.h" +#include "../Global.h" -#endif \ No newline at end of file +#endif diff --git a/plugins/spu2-x/src/Linux/SPU2-X.cbp b/plugins/spu2-x/src/Linux/SPU2-X.cbp index fc01d3b4fb..971a9c1daa 100644 --- a/plugins/spu2-x/src/Linux/SPU2-X.cbp +++ b/plugins/spu2-x/src/Linux/SPU2-X.cbp @@ -36,7 +36,7 @@ - + @@ -50,7 +50,7 @@ - + diff --git a/plugins/spu2-x/src/Lowpass.cpp b/plugins/spu2-x/src/Lowpass.cpp index 1624306cd6..d9d89b171b 100644 --- a/plugins/spu2-x/src/Lowpass.cpp +++ b/plugins/spu2-x/src/Lowpass.cpp @@ -16,6 +16,7 @@ */ #include "Lowpass.h" +#include "Global.h" #include #include diff --git a/plugins/spu2-x/src/Mixer.cpp b/plugins/spu2-x/src/Mixer.cpp index e1d12bc085..5f55c9aae3 100644 --- a/plugins/spu2-x/src/Mixer.cpp +++ b/plugins/spu2-x/src/Mixer.cpp @@ -294,7 +294,7 @@ static s32 __forceinline GetNoiseValues() "XOR %%eax,%%ebx\n" "ROR %%eax,3\n" "MOV %0,%%eax\n" - ".att_syntax\n" : "m="(Seed) : "m"(Seed)); + ".att_syntax\n" : "r="(Seed) :"r"(Seed)); #endif return retval; } diff --git a/plugins/spu2-x/src/ReadInput.cpp b/plugins/spu2-x/src/ReadInput.cpp index a00823c849..0629e461a8 100644 --- a/plugins/spu2-x/src/ReadInput.cpp +++ b/plugins/spu2-x/src/ReadInput.cpp @@ -16,7 +16,7 @@ */ #include "Global.h" -#include "dma.h" +#include "Dma.h" #include "PS2E-spu2.h" // required for ENABLE_NEW_IOPDMA_SPU2 define