mirror of https://github.com/PCSX2/pcsx2.git
Hack at spu2-x until it compiles in Linux, and is usable as a null plugin. (No, no sound yet, or configuration dialogs. It's a step in the right direction, though.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2616 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d36fca730b
commit
dcb76739c8
|
@ -102,7 +102,7 @@ void WriteSettings()
|
||||||
void configure()
|
void configure()
|
||||||
{
|
{
|
||||||
ReadSettings();
|
ReadSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageBox(char const*, ...)
|
void MessageBox(char const*, ...)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
#include "SoundTouch/SoundTouch.h"
|
||||||
|
|
||||||
namespace SoundtouchCfg
|
namespace SoundtouchCfg
|
||||||
{
|
{
|
||||||
|
@ -32,6 +33,13 @@ void ClampValues()
|
||||||
Clampify( OverlapMS, Overlap_Min, Overlap_Max );
|
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()
|
void ReadSettings()
|
||||||
{
|
{
|
||||||
//SequenceLenMS = CfgReadInt( L"SOUNDTOUCH", L"SequenceLengthMS", 63 );
|
//SequenceLenMS = CfgReadInt( L"SOUNDTOUCH", L"SequenceLengthMS", 63 );
|
||||||
|
|
|
@ -15,4 +15,60 @@
|
||||||
* along with SPU2-X. If not, see <http://www.gnu.org/licenses/>.
|
* along with SPU2-X. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// To be continued...
|
// To be continued...
|
||||||
|
|
||||||
|
#include "Dialogs.h"
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -18,7 +18,18 @@
|
||||||
#ifndef DIALOG_H_INCLUDED
|
#ifndef DIALOG_H_INCLUDED
|
||||||
#define DIALOG_H_INCLUDED
|
#define DIALOG_H_INCLUDED
|
||||||
|
|
||||||
#include "../Config.h"
|
|
||||||
#include "../Global.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
|
#endif
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<Option compiler="gcc" />
|
<Option compiler="gcc" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-g" />
|
<Add option="-g" />
|
||||||
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=yes --cflags`" />
|
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="../../../../deps/debug/libsoundtouch-dbg.a" />
|
<Add library="../../../../deps/debug/libsoundtouch-dbg.a" />
|
||||||
|
@ -26,7 +25,6 @@
|
||||||
<Option compiler="gcc" />
|
<Option compiler="gcc" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-O2" />
|
<Add option="-O2" />
|
||||||
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=no --cflags`" />
|
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add option="-s" />
|
<Add option="-s" />
|
||||||
|
@ -37,6 +35,7 @@
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-Wall" />
|
<Add option="-Wall" />
|
||||||
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --cflags`" />
|
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --cflags`" />
|
||||||
|
<Add option="`pkg-config gtk+-2.0 --cflags`" />
|
||||||
<Add option="-fPIC" />
|
<Add option="-fPIC" />
|
||||||
<Add option="-m32" />
|
<Add option="-m32" />
|
||||||
<Add option="-liconv" />
|
<Add option="-liconv" />
|
||||||
|
@ -48,12 +47,15 @@
|
||||||
<Add directory="../../../../common/include" />
|
<Add directory="../../../../common/include" />
|
||||||
<Add directory="../../../../3rdparty/SoundTouch" />
|
<Add directory="../../../../3rdparty/SoundTouch" />
|
||||||
<Add directory="../../../../3rdparty" />
|
<Add directory="../../../../3rdparty" />
|
||||||
|
<Add directory="../../../../common/src/x86emitter" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --libs`" />
|
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --libs`" />
|
||||||
|
<Add option="`pkg-config gtk+-2.0 --libs`" />
|
||||||
<Add option="-shared" />
|
<Add option="-shared" />
|
||||||
<Add library="asound" />
|
<Add library="asound" />
|
||||||
<Add library="stdc++" />
|
<Add library="stdc++" />
|
||||||
|
<Add library="portaudio" />
|
||||||
</Linker>
|
</Linker>
|
||||||
<Unit filename="../3rdparty/liba52/a52.h" />
|
<Unit filename="../3rdparty/liba52/a52.h" />
|
||||||
<Unit filename="../3rdparty/liba52/a52_internal.h" />
|
<Unit filename="../3rdparty/liba52/a52_internal.h" />
|
||||||
|
@ -81,14 +83,20 @@
|
||||||
<Unit filename="../3rdparty/liba52/tables.h" />
|
<Unit filename="../3rdparty/liba52/tables.h" />
|
||||||
<Unit filename="../3rdparty/liba52/tendra.h" />
|
<Unit filename="../3rdparty/liba52/tendra.h" />
|
||||||
<Unit filename="../ADSR.cpp" />
|
<Unit filename="../ADSR.cpp" />
|
||||||
|
<Unit filename="../Config.h" />
|
||||||
<Unit filename="../ConvertUTF.cpp" />
|
<Unit filename="../ConvertUTF.cpp" />
|
||||||
<Unit filename="../ConvertUTF.h" />
|
<Unit filename="../ConvertUTF.h" />
|
||||||
<Unit filename="../DPLII.h" />
|
<Unit filename="../DPLII.h" />
|
||||||
<Unit filename="../Debug.cpp" />
|
<Unit filename="../Debug.cpp" />
|
||||||
<Unit filename="../Debug.h" />
|
<Unit filename="../Debug.h" />
|
||||||
|
<Unit filename="../DecodeDPLII.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
<Unit filename="../Decoder.cpp" />
|
<Unit filename="../Decoder.cpp" />
|
||||||
<Unit filename="../Dma.cpp" />
|
<Unit filename="../Dma.cpp" />
|
||||||
<Unit filename="../Dma.h" />
|
<Unit filename="../Dma.h" />
|
||||||
|
<Unit filename="../Global.h" />
|
||||||
<Unit filename="Alsa.cpp" />
|
<Unit filename="Alsa.cpp" />
|
||||||
<Unit filename="Alsa.h" />
|
<Unit filename="Alsa.h" />
|
||||||
<Unit filename="Config.cpp" />
|
<Unit filename="Config.cpp" />
|
||||||
|
@ -100,20 +108,90 @@
|
||||||
<Unit filename="../Lowpass.cpp" />
|
<Unit filename="../Lowpass.cpp" />
|
||||||
<Unit filename="../Lowpass.h" />
|
<Unit filename="../Lowpass.h" />
|
||||||
<Unit filename="../Mixer.cpp" />
|
<Unit filename="../Mixer.cpp" />
|
||||||
|
<Unit filename="../Mixer.h" />
|
||||||
|
<Unit filename="../PS2E-spu2.cpp" />
|
||||||
|
<Unit filename="../PS2E-spu2.h" />
|
||||||
|
<Unit filename="../PrecompiledHeader.cpp" />
|
||||||
<Unit filename="../ReadInput.cpp" />
|
<Unit filename="../ReadInput.cpp" />
|
||||||
<Unit filename="../RegLog.cpp" />
|
<Unit filename="../RegLog.cpp" />
|
||||||
<Unit filename="../RegTable.cpp" />
|
<Unit filename="../RegTable.cpp" />
|
||||||
<Unit filename="../Reverb.cpp" />
|
<Unit filename="../Reverb.cpp" />
|
||||||
<Unit filename="../SndOut.cpp" />
|
<Unit filename="../SndOut.cpp" />
|
||||||
<Unit filename="../SndOut.h" />
|
<Unit filename="../SndOut.h" />
|
||||||
|
<Unit filename="../SndOut_Portaudio.cpp" />
|
||||||
<Unit filename="../Spu2replay.cpp" />
|
<Unit filename="../Spu2replay.cpp" />
|
||||||
<Unit filename="../Spu2replay.h" />
|
<Unit filename="../Spu2replay.h" />
|
||||||
<Unit filename="../Timestretcher.cpp" />
|
<Unit filename="../Timestretcher.cpp" />
|
||||||
<Unit filename="../Wavedump_wav.cpp" />
|
<Unit filename="../Wavedump_wav.cpp" />
|
||||||
|
<Unit filename="../Windows/AboutBox.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/CfgHelpers.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/Config.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/ConfigDebug.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/ConfigSoundtouch.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/Dialogs.h" />
|
||||||
|
<Unit filename="../Windows/Dsound51.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/Hyperlinks.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/Hyperlinks.h" />
|
||||||
|
<Unit filename="../Windows/RealtimeDebugger.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/SndOut_DSound.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/SndOut_XAudio2.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/SndOut_waveOut.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/Spu2-X.def" />
|
||||||
|
<Unit filename="../Windows/Spu2-X.rc">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/Spu2-X_vs2008.vcproj" />
|
||||||
|
<Unit filename="../Windows/UIHelpers.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/WinConfig.h" />
|
||||||
|
<Unit filename="../Windows/dsp.cpp">
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="../Windows/dsp.h" />
|
||||||
|
<Unit filename="../Windows/resource.h" />
|
||||||
<Unit filename="../defs.h" />
|
<Unit filename="../defs.h" />
|
||||||
<Unit filename="../iconvert.cpp" />
|
<Unit filename="../iconvert.cpp" />
|
||||||
<Unit filename="../regs.h" />
|
<Unit filename="../regs.h" />
|
||||||
<Unit filename="../spdif.h" />
|
<Unit filename="../spdif.h" />
|
||||||
|
<Unit filename="../spu2freeze.cpp" />
|
||||||
|
<Unit filename="../spu2sys.cpp" />
|
||||||
<Unit filename="../utf8.cpp" />
|
<Unit filename="../utf8.cpp" />
|
||||||
<Unit filename="../utf8.h" />
|
<Unit filename="../utf8.h" />
|
||||||
<Extensions>
|
<Extensions>
|
||||||
|
|
|
@ -17,10 +17,12 @@
|
||||||
|
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
#include "PS2E-spu2.h"
|
#include "PS2E-spu2.h"
|
||||||
#include "dma.h"
|
#include "Dma.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
|
|
||||||
|
#ifndef __LINUX__
|
||||||
#include "x86emitter/tools.h"
|
#include "x86emitter/tools.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# include "svnrev.h"
|
# include "svnrev.h"
|
||||||
|
@ -110,6 +112,8 @@ static bool cpu_detected = false;
|
||||||
|
|
||||||
static bool CheckSSE()
|
static bool CheckSSE()
|
||||||
{
|
{
|
||||||
|
// I'll worry about checking sse2 in Linux later.
|
||||||
|
#ifndef __LINUX__
|
||||||
if( !cpu_detected )
|
if( !cpu_detected )
|
||||||
{
|
{
|
||||||
cpudetectInit();
|
cpudetectInit();
|
||||||
|
@ -121,6 +125,7 @@ static bool CheckSSE()
|
||||||
SysMessage( "Your CPU does not support SSE2 instructions.\nThe SPU2-X plugin requires SSE2 to run." );
|
SysMessage( "Your CPU does not support SSE2 instructions.\nThe SPU2-X plugin requires SSE2 to run." );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,15 @@
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
|
|
||||||
#include "portaudio/include/portaudio.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
|
class Portaudio : public SndOutModule
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -46,36 +54,37 @@ private:
|
||||||
|
|
||||||
bool started;
|
bool started;
|
||||||
PaStream* stream;
|
PaStream* stream;
|
||||||
|
|
||||||
static int PaCallback( const void *inputBuffer, void *outputBuffer,
|
#ifndef __LINUX__
|
||||||
unsigned long framesPerBuffer,
|
static int PaCallback( const void *inputBuffer, void *outputBuffer,
|
||||||
const PaStreamCallbackTimeInfo* timeInfo,
|
unsigned long framesPerBuffer,
|
||||||
PaStreamCallbackFlags statusFlags,
|
const PaStreamCallbackTimeInfo* timeInfo,
|
||||||
void *userData )
|
PaStreamCallbackFlags statusFlags,
|
||||||
{
|
void *userData )
|
||||||
return PA.ActualPaCallback(inputBuffer,outputBuffer,framesPerBuffer,timeInfo,statusFlags,userData);
|
{
|
||||||
}
|
return PA.ActualPaCallback(inputBuffer,outputBuffer,framesPerBuffer,timeInfo,statusFlags,userData);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
int ActualPaCallback( const void *inputBuffer, void *outputBuffer,
|
|
||||||
unsigned long framesPerBuffer,
|
public:
|
||||||
const PaStreamCallbackTimeInfo* timeInfo,
|
int ActualPaCallback( const void *inputBuffer, void *outputBuffer,
|
||||||
PaStreamCallbackFlags statusFlags,
|
unsigned long framesPerBuffer,
|
||||||
void *userData )
|
const PaStreamCallbackTimeInfo* timeInfo,
|
||||||
{
|
PaStreamCallbackFlags statusFlags,
|
||||||
StereoOut32* p1 = (StereoOut32*)outputBuffer;
|
void *userData )
|
||||||
|
{
|
||||||
int packets = framesPerBuffer / SndOutPacketSize;
|
StereoOut32* p1 = (StereoOut32*)outputBuffer;
|
||||||
|
|
||||||
for(int p=0; p<packets; p++, p1+=SndOutPacketSize )
|
int packets = framesPerBuffer / SndOutPacketSize;
|
||||||
SndBuffer::ReadSamples( p1 );
|
|
||||||
|
for(int p=0; p<packets; p++, p1+=SndOutPacketSize )
|
||||||
writtenSoFar += packets * SndOutPacketSize;
|
SndBuffer::ReadSamples( p1 );
|
||||||
|
|
||||||
return 0;
|
writtenSoFar += packets * SndOutPacketSize;
|
||||||
}
|
|
||||||
|
return 0;
|
||||||
public:
|
}
|
||||||
|
|
||||||
Portaudio()
|
Portaudio()
|
||||||
{
|
{
|
||||||
m_ApiId=-1;
|
m_ApiId=-1;
|
||||||
|
@ -114,7 +123,10 @@ public:
|
||||||
MultiByteToWideChar(CP_UTF8,0,info->name,strlen(info->name),buffer,999);
|
MultiByteToWideChar(CP_UTF8,0,info->name,strlen(info->name),buffer,999);
|
||||||
buffer[999]=0;
|
buffer[999]=0;
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
if(m_Device == buffer)
|
if(m_Device == buffer)
|
||||||
|
@ -138,7 +150,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(deviceIndex>=0)
|
if(deviceIndex>=0)
|
||||||
{
|
{
|
||||||
PaStreamParameters outParams = {
|
PaStreamParameters outParams = {
|
||||||
|
@ -153,20 +165,30 @@ public:
|
||||||
paInt32,
|
paInt32,
|
||||||
0, //?
|
0, //?
|
||||||
NULL
|
NULL
|
||||||
|
};
|
||||||
};
|
|
||||||
|
|
||||||
err = Pa_OpenStream(&stream,
|
err = Pa_OpenStream(&stream,
|
||||||
NULL, &outParams, SampleRate,
|
NULL, &outParams, SampleRate,
|
||||||
SndOutPacketSize,
|
SndOutPacketSize,
|
||||||
paNoFlag, PaCallback, NULL);
|
paNoFlag,
|
||||||
|
#ifndef __LINUX__
|
||||||
|
PaCallback,
|
||||||
|
#else
|
||||||
|
PaLinuxCallback,
|
||||||
|
#endif
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
err = Pa_OpenDefaultStream( &stream,
|
err = Pa_OpenDefaultStream( &stream,
|
||||||
0, 2, paInt32, 48000,
|
0, 2, paInt32, 48000,
|
||||||
SndOutPacketSize,
|
SndOutPacketSize,
|
||||||
PaCallback, NULL );
|
#ifndef __LINUX__
|
||||||
|
PaCallback,
|
||||||
|
#else
|
||||||
|
PaLinuxCallback,
|
||||||
|
#endif
|
||||||
|
NULL );
|
||||||
}
|
}
|
||||||
if( err != paNoError )
|
if( err != paNoError )
|
||||||
{
|
{
|
||||||
|
@ -301,5 +323,16 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
} static PA;
|
} 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;
|
SndOutModule *PortaudioOut = &PA;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
#include "dma.h"
|
#include "Dma.h"
|
||||||
|
|
||||||
#include "PS2E-spu2.h" // needed until I figure out a nice solution for irqcallback dependencies.
|
#include "PS2E-spu2.h" // needed until I figure out a nice solution for irqcallback dependencies.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue