mirror of https://github.com/PCSX2/pcsx2.git
spu2x:
* fix linux compilation debug build * Add a linux option to select the API output of portaudio (ALSA, JACK and OSS) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4224 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
351f894fa0
commit
fb2a02af42
|
@ -250,6 +250,10 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void SetApiSettings(wxString api)
|
||||
{
|
||||
}
|
||||
|
||||
void WriteSettings() const
|
||||
{
|
||||
}
|
||||
|
|
|
@ -44,11 +44,13 @@ int Interpolation = 1;
|
|||
bool EffectsDisabled = false;
|
||||
int ReverbBoost = 0;
|
||||
bool postprocess_filter_enabled = 1;
|
||||
bool _visual_debug_enabled = false; // windows only feature
|
||||
|
||||
// OUTPUT
|
||||
u32 OutputModule = 0;
|
||||
int SndOutLatencyMS = 300;
|
||||
int SynchMode = 0; // Time Stretch, Async or Disabled
|
||||
static u32 OutputAPI = 0;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
@ -135,6 +137,7 @@ void DisplayDialog()
|
|||
|
||||
GtkWidget *output_frame, *output_box;
|
||||
GtkWidget *mod_label, *mod_box;
|
||||
GtkWidget *api_label, *api_box;
|
||||
GtkWidget *latency_label, *latency_slide;
|
||||
GtkWidget *sync_label, *sync_box;
|
||||
GtkWidget *advanced_button;
|
||||
|
@ -179,6 +182,14 @@ void DisplayDialog()
|
|||
//gtk_combo_box_append_text(GTK_COMBO_BOX(mod_box), "2 - Alsa (probably doesn't work)");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(mod_box), OutputModule);
|
||||
|
||||
api_label = gtk_label_new ("PortAudio API:");
|
||||
api_box = gtk_combo_box_new_text ();
|
||||
// In order to keep it the menu light, I only put linux major api
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(api_box), "0 - ALSA (recommended)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(api_box), "1 - OSS (legacy)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(api_box), "2 - JACK");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(api_box), OutputAPI);
|
||||
|
||||
latency_label = gtk_label_new ("Latency:");
|
||||
latency_slide = gtk_hscale_new_with_range(LATENCY_MIN, LATENCY_MAX, 5);
|
||||
gtk_range_set_value(GTK_RANGE(latency_slide), SndOutLatencyMS);
|
||||
|
@ -214,6 +225,8 @@ void DisplayDialog()
|
|||
|
||||
gtk_container_add(GTK_CONTAINER(output_box), mod_label);
|
||||
gtk_container_add(GTK_CONTAINER(output_box), mod_box);
|
||||
gtk_container_add(GTK_CONTAINER(output_box), api_label);
|
||||
gtk_container_add(GTK_CONTAINER(output_box), api_box);
|
||||
gtk_container_add(GTK_CONTAINER(output_box), sync_label);
|
||||
gtk_container_add(GTK_CONTAINER(output_box), sync_box);
|
||||
gtk_container_add(GTK_CONTAINER(output_box), latency_label);
|
||||
|
@ -248,6 +261,16 @@ void DisplayDialog()
|
|||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(mod_box)) != -1)
|
||||
OutputModule = gtk_combo_box_get_active(GTK_COMBO_BOX(mod_box));
|
||||
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(api_box)) != -1) {
|
||||
OutputAPI = gtk_combo_box_get_active(GTK_COMBO_BOX(api_box));
|
||||
switch(OutputAPI) {
|
||||
case 0: PortaudioOut->SetApiSettings(L"ALSA"); break;
|
||||
case 1: PortaudioOut->SetApiSettings(L"OSS"); break;
|
||||
case 2: PortaudioOut->SetApiSettings(L"JACK"); break;
|
||||
default: PortaudioOut->SetApiSettings(L"Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
SndOutLatencyMS = gtk_range_get_value(GTK_RANGE(latency_slide));
|
||||
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(sync_box)) != -1)
|
||||
|
|
|
@ -417,6 +417,7 @@ EXPORT_C_(s32) SPU2open(void *pDsp)
|
|||
else
|
||||
gsWindowHandle = 0;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef PCSX2_DEVBUILD // Define may not be needed but not tested yet. Better make sure.
|
||||
if( IsDevBuild && VisualDebug() )
|
||||
{
|
||||
|
@ -432,6 +433,7 @@ EXPORT_C_(s32) SPU2open(void *pDsp)
|
|||
DestroyWindow(hDebugDialog);
|
||||
debugDialogOpen=0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
IsOpened = true;
|
||||
|
|
|
@ -74,6 +74,10 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void SetApiSettings(wxString api)
|
||||
{
|
||||
}
|
||||
|
||||
void WriteSettings() const
|
||||
{
|
||||
}
|
||||
|
|
|
@ -471,6 +471,9 @@ public:
|
|||
// Loads settings from the INI file for this driver
|
||||
virtual void ReadSettings()=0;
|
||||
|
||||
// Set output API for this driver
|
||||
virtual void SetApiSettings(wxString api) =0;
|
||||
|
||||
// Saves settings to the INI file for this driver
|
||||
virtual void WriteSettings() const=0;
|
||||
|
||||
|
|
|
@ -294,6 +294,13 @@ public:
|
|||
CfgReadStr( L"PORTAUDIO", L"HostApi", api, L"Unknown" );
|
||||
CfgReadStr( L"PORTAUDIO", L"Device", m_Device, L"default" );
|
||||
|
||||
SetApiSettings(api);
|
||||
|
||||
m_WasapiExclusiveMode = CfgReadBool( L"PORTAUDIO", L"Wasapi_Exclusive_Mode", false);
|
||||
}
|
||||
|
||||
void SetApiSettings(wxString api)
|
||||
{
|
||||
m_ApiId = -1;
|
||||
if(api == L"InDevelopment") m_ApiId = paInDevelopment; /* use while developing support for a new host API */
|
||||
if(api == L"DirectSound") m_ApiId = paDirectSound;
|
||||
|
@ -309,8 +316,6 @@ public:
|
|||
if(api == L"JACK") m_ApiId = paJACK;
|
||||
if(api == L"WASAPI") m_ApiId = paWASAPI;
|
||||
if(api == L"AudioScienceHPI") m_ApiId = paAudioScienceHPI;
|
||||
|
||||
m_WasapiExclusiveMode = CfgReadBool( L"PORTAUDIO", L"Wasapi_Exclusive_Mode", false);
|
||||
}
|
||||
|
||||
void WriteSettings() const
|
||||
|
|
|
@ -463,6 +463,10 @@ public:
|
|||
Clampify( m_NumBuffers, (u8)3, (u8)8 );
|
||||
}
|
||||
|
||||
void SetApiSettings(wxString api)
|
||||
{
|
||||
}
|
||||
|
||||
void WriteSettings() const
|
||||
{
|
||||
CfgWriteStr( L"DSOUNDOUT", L"Device", m_Device.empty() ? L"default" : m_Device );
|
||||
|
|
|
@ -395,6 +395,10 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void SetApiSettings(wxString api)
|
||||
{
|
||||
}
|
||||
|
||||
void WriteSettings() const
|
||||
{
|
||||
}
|
||||
|
|
|
@ -315,6 +315,10 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void SetApiSettings(wxString api)
|
||||
{
|
||||
}
|
||||
|
||||
void WriteSettings() const
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue