diff --git a/plugins/spu2-x/src/Linux/AboutBox.cpp b/plugins/spu2-x/src/Linux/AboutBox.cpp
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/plugins/spu2-x/src/Linux/CfgHelpers.cpp b/plugins/spu2-x/src/Linux/CfgHelpers.cpp
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/plugins/spu2-x/src/Linux/Config.cpp b/plugins/spu2-x/src/Linux/Config.cpp
index b5e802a1a5..45c667ee99 100644
--- a/plugins/spu2-x/src/Linux/Config.cpp
+++ b/plugins/spu2-x/src/Linux/Config.cpp
@@ -102,7 +102,7 @@ void WriteSettings()
void configure()
{
ReadSettings();
-}
+}
void MessageBox(char const*, ...)
{
diff --git a/plugins/spu2-x/src/Linux/ConfigDebug.cpp b/plugins/spu2-x/src/Linux/ConfigDebug.cpp
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp b/plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp
index e7b8b5952f..f81694d880 100644
--- a/plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp
+++ b/plugins/spu2-x/src/Linux/ConfigSoundTouch.cpp
@@ -22,6 +22,7 @@
#include "Global.h"
#include "Dialogs.h"
#include "Config.h"
+#include "SoundTouch/SoundTouch.h"
namespace SoundtouchCfg
{
@@ -32,6 +33,13 @@ void ClampValues()
Clampify( OverlapMS, Overlap_Min, Overlap_Max );
}
+void ApplySettings( soundtouch::SoundTouch& sndtouch )
+{
+ sndtouch.setSetting( SETTING_SEQUENCE_MS, SequenceLenMS );
+ sndtouch.setSetting( SETTING_SEEKWINDOW_MS, SeekWindowMS );
+ sndtouch.setSetting( SETTING_OVERLAP_MS, OverlapMS );
+}
+
void ReadSettings()
{
//SequenceLenMS = CfgReadInt( L"SOUNDTOUCH", L"SequenceLengthMS", 63 );
diff --git a/plugins/spu2-x/src/Linux/Dialogs.cpp b/plugins/spu2-x/src/Linux/Dialogs.cpp
index dfe8ea4b08..ada151fc74 100644
--- a/plugins/spu2-x/src/Linux/Dialogs.cpp
+++ b/plugins/spu2-x/src/Linux/Dialogs.cpp
@@ -15,4 +15,60 @@
* along with SPU2-X. If not, see .
*/
- // To be continued...
\ No newline at end of file
+ // To be continued...
+
+ #include "Dialogs.h"
+#include
+#include
+
+void CfgWriteStr(const wchar_t* Section, const wchar_t* Name, const wstring& Data)
+{
+}
+
+void CfgReadStr(const wchar_t* Section, const wchar_t* Name, wstring& Data, int DataSize, const wchar_t* Default)
+{
+}
+
+
+void __forceinline SysMessage(const char *fmt, ...)
+{
+ va_list list;
+ char msg[512];
+
+ va_start(list, fmt);
+ vsprintf(msg, fmt, list);
+ va_end(list);
+
+ if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0;
+
+ GtkWidget *dialog;
+ dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_OK,
+ "%s", msg);
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+}
+
+void SysMessage(wchar_t const*, ...)
+{
+}
+
+void DspUpdate()
+{
+}
+
+s32 DspLoadLibrary(wchar_t* fileName, int modnum)
+{
+ return 0;
+}
+
+void AboutBox()
+{
+ SysMessage("Yay: Aboutbox.");
+}
+
+void CfgSetSettingsDir(const char* dir)
+{
+}
diff --git a/plugins/spu2-x/src/Linux/Dialogs.h b/plugins/spu2-x/src/Linux/Dialogs.h
index d19ad49f8e..6e3b3970b2 100644
--- a/plugins/spu2-x/src/Linux/Dialogs.h
+++ b/plugins/spu2-x/src/Linux/Dialogs.h
@@ -18,7 +18,18 @@
#ifndef DIALOG_H_INCLUDED
#define DIALOG_H_INCLUDED
-#include "../Config.h"
#include "../Global.h"
+#include "../Config.h"
+
+extern void CfgSetSettingsDir(const char* dir);
+
+//extern void CfgWriteBool(const wchar_t* Section, const wchar_t* Name, bool Value);
+//extern void CfgWriteInt(const wchar_t* Section, const wchar_t* Name, int Value);
+extern void CfgWriteStr(const wchar_t* Section, const wchar_t* Name, const wstring& Data);
+
+//extern bool CfgReadBool(const wchar_t *Section,const wchar_t* Name, bool Default);
+extern void CfgReadStr(const wchar_t* Section, const wchar_t* Name, wstring& Data, int DataSize, const wchar_t* Default);
+//extern void CfgReadStr(const wchar_t* Section, const wchar_t* Name, wchar_t* Data, int DataSize, const wchar_t* Default);
+//extern int CfgReadInt(const wchar_t* Section, const wchar_t* Name,int Default);
#endif
diff --git a/plugins/spu2-x/src/Linux/SPU2-X.cbp b/plugins/spu2-x/src/Linux/SPU2-X.cbp
index 971a9c1daa..af1377e9a3 100644
--- a/plugins/spu2-x/src/Linux/SPU2-X.cbp
+++ b/plugins/spu2-x/src/Linux/SPU2-X.cbp
@@ -13,7 +13,6 @@
-
@@ -26,7 +25,6 @@
-
@@ -37,6 +35,7 @@
+
@@ -48,12 +47,15 @@
+
+
+
@@ -81,14 +83,20 @@
+
+
+
+
+
+
@@ -100,20 +108,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/spu2-x/src/PS2E-spu2.cpp b/plugins/spu2-x/src/PS2E-spu2.cpp
index 52f26eb1f6..55f56c2d24 100644
--- a/plugins/spu2-x/src/PS2E-spu2.cpp
+++ b/plugins/spu2-x/src/PS2E-spu2.cpp
@@ -17,10 +17,12 @@
#include "Global.h"
#include "PS2E-spu2.h"
-#include "dma.h"
+#include "Dma.h"
#include "Dialogs.h"
+#ifndef __LINUX__
#include "x86emitter/tools.h"
+#endif
#ifdef _MSC_VER
# include "svnrev.h"
@@ -110,6 +112,8 @@ static bool cpu_detected = false;
static bool CheckSSE()
{
+// I'll worry about checking sse2 in Linux later.
+#ifndef __LINUX__
if( !cpu_detected )
{
cpudetectInit();
@@ -121,6 +125,7 @@ static bool CheckSSE()
SysMessage( "Your CPU does not support SSE2 instructions.\nThe SPU2-X plugin requires SSE2 to run." );
return false;
}
+#endif
return true;
}
diff --git a/plugins/spu2-x/src/SndOut_Portaudio.cpp b/plugins/spu2-x/src/SndOut_Portaudio.cpp
index d2af06113c..b1b6b5037f 100644
--- a/plugins/spu2-x/src/SndOut_Portaudio.cpp
+++ b/plugins/spu2-x/src/SndOut_Portaudio.cpp
@@ -21,7 +21,15 @@
#include "Dialogs.h"
#include "portaudio/include/portaudio.h"
-
+
+#ifdef __LINUX__
+int PaLinuxCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData );
+#endif
+
class Portaudio : public SndOutModule
{
private:
@@ -46,36 +54,37 @@ private:
bool started;
PaStream* stream;
-
- static int PaCallback( const void *inputBuffer, void *outputBuffer,
- unsigned long framesPerBuffer,
- const PaStreamCallbackTimeInfo* timeInfo,
- PaStreamCallbackFlags statusFlags,
- void *userData )
- {
- return PA.ActualPaCallback(inputBuffer,outputBuffer,framesPerBuffer,timeInfo,statusFlags,userData);
- }
-
-
- int ActualPaCallback( const void *inputBuffer, void *outputBuffer,
- unsigned long framesPerBuffer,
- const PaStreamCallbackTimeInfo* timeInfo,
- PaStreamCallbackFlags statusFlags,
- void *userData )
- {
- StereoOut32* p1 = (StereoOut32*)outputBuffer;
-
- int packets = framesPerBuffer / SndOutPacketSize;
-
- for(int p=0; pname,strlen(info->name),buffer,999);
buffer[999]=0;
#else
-# error TODO
+//# error TODO
+ static wchar_t buffer [1000];
+ //MultiByteToWideChar(CP_UTF8,0,info->name,strlen(info->name),buffer,999);
+ buffer[999]=0;
#endif
if(m_Device == buffer)
@@ -138,7 +150,7 @@ public:
}
}
}
-
+
if(deviceIndex>=0)
{
PaStreamParameters outParams = {
@@ -153,20 +165,30 @@ public:
paInt32,
0, //?
NULL
-
- };
-
+ };
+
err = Pa_OpenStream(&stream,
NULL, &outParams, SampleRate,
SndOutPacketSize,
- paNoFlag, PaCallback, NULL);
+ paNoFlag,
+#ifndef __LINUX__
+ PaCallback,
+#else
+ PaLinuxCallback,
+#endif
+ NULL);
}
else
{
err = Pa_OpenDefaultStream( &stream,
0, 2, paInt32, 48000,
- SndOutPacketSize,
- PaCallback, NULL );
+ SndOutPacketSize,
+#ifndef __LINUX__
+ PaCallback,
+#else
+ PaLinuxCallback,
+#endif
+ NULL );
}
if( err != paNoError )
{
@@ -301,5 +323,16 @@ public:
}
} static PA;
+
+#ifdef __LINUX__
+ int PaLinuxCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+ {
+ return PA.ActualPaCallback(inputBuffer,outputBuffer,framesPerBuffer,timeInfo,statusFlags,userData);
+ }
+#endif
SndOutModule *PortaudioOut = &PA;
diff --git a/plugins/spu2-x/src/spu2sys.cpp b/plugins/spu2-x/src/spu2sys.cpp
index 943435c915..f4ba6f2e2b 100644
--- a/plugins/spu2-x/src/spu2sys.cpp
+++ b/plugins/spu2-x/src/spu2sys.cpp
@@ -23,7 +23,7 @@
#include "Global.h"
-#include "dma.h"
+#include "Dma.h"
#include "PS2E-spu2.h" // needed until I figure out a nice solution for irqcallback dependencies.