DSP plugin merge - the two DSP plugins are now gone and all the code has been merged into Dolphin.

This WILL temporarily break the Linux and MacOSX builds but should be easy to fix.

Things left to do:
  * The UI on the new Audio tab for the LLE/HLE choice is ugly
  * At times the code still look "plugin-y" and needs cleanup
  * The two plugins should be merged further. DSPHLE should use the emulated memory etc of DSPLLE as much as possible, so that simply saving the DSPLLE state is enough. This would also bring the possibility of savestate compatibility between the two plugins.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6947 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2011-01-28 18:39:30 +00:00
parent 976420b9d5
commit 419d6a244b
116 changed files with 1271 additions and 3914 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Version="9,00"
Name="Dolphin"
ProjectGUID="{A72606EF-C5C1-4954-90AD-F0F93A8D97D9}"
RootNamespace="DolphinWX"
@ -56,7 +56,7 @@
Optimization="3"
InlineFunctionExpansion="0"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\AudioCommon\Src;..\InputCommon\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\AudioCommon\Src..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
StringPooling="false"
RuntimeLibrary="0"
@ -90,11 +90,11 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib OpenAL32.lib"
OutputFile="../../../Binary/$(PlatformName)/Dolphin.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;&quot;../../../Externals/OpenAL/$(PlatformName)/&quot;;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;../../../Externals/OpenAL/Win32/;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
@ -175,7 +175,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="false"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\AudioCommon\Src;..\InputCommon\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\AudioCommon\Src..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
@ -208,11 +208,11 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib OpenAL32.lib"
OutputFile="../../../Binary/$(PlatformName)/Dolphin.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;&quot;../../../Externals/OpenAL/$(PlatformName)/&quot;;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;../../../Externals/OpenAL/Win64/;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
@ -287,7 +287,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\AudioCommon\Src;..\InputCommon\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\AudioCommon\Src..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -321,11 +321,11 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/TLBID:1"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28ud.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28ud.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib OpenAL32.lib"
OutputFile="../../../Binary/Win32/DolphinD.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;&quot;../../../Externals/OpenAL/$(PlatformName)/&quot;;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;../../../Externals/OpenAL/Win32/;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
@ -398,7 +398,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\AudioCommon\Src;..\InputCommon\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\AudioCommon\Src..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -432,11 +432,11 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/TLBID:1"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28ud.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28ud.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib OpenAL32.lib"
OutputFile="../../../Binary/x64/DolphinD.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;&quot;../../../Externals/OpenAL/$(PlatformName)/&quot;;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;../../../Externals/OpenAL/Win64/;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
@ -511,7 +511,7 @@
Optimization="2"
InlineFunctionExpansion="1"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\AudioCommon\Src;..\InputCommon\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\AudioCommon\Src..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
PreprocessorDefinitions="DEBUGFAST;WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
@ -546,11 +546,11 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NODEFAULTLIB:msvcrt.lib&#x0D;&#x0A;/NODEFAULTLIB:libcmtd.lib"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib OpenAL32.lib"
OutputFile="../../../Binary/Win32/DolphinDF.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;&quot;../../../Externals/OpenAL/$(PlatformName)/&quot;;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;../../../Externals/OpenAL/Win32/;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
@ -627,7 +627,7 @@
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\AudioCommon\Src;..\InputCommon\Src;..\DebuggerWX\src;..\DebuggerUICommon\Src;..\DiscIO\Src;..\AudioCommon\Src..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include;..\..\..\Externals\CLRun\include"
PreprocessorDefinitions="DEBUGFAST;WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
StringPooling="true"
RuntimeLibrary="0"
@ -659,11 +659,11 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib"
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib OpenAL32.lib"
OutputFile="../../../Binary/x64/DolphinDF.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;&quot;../../../Externals/OpenAL/$(PlatformName)/&quot;;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
AdditionalLibraryDirectories="&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;;../../../Externals/OpenAL/Win64/;&quot;..\..\..\Externals\SDL\$(PlatformName)&quot;"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
@ -840,6 +840,22 @@
RelativePath=".\src\ConfigMain.h"
>
</File>
<File
RelativePath=".\Src\DSPHLEConfigDlg.cpp"
>
</File>
<File
RelativePath=".\Src\DSPHLEConfigDlg.h"
>
</File>
<File
RelativePath=".\Src\DSPLLEConfigDlg.cpp"
>
</File>
<File
RelativePath=".\Src\DSPLLEConfigDlg.h"
>
</File>
<File
RelativePath=".\src\Frame.cpp"
>

View File

@ -17,6 +17,7 @@
#include <string> // System
#include <vector>
#include <wx/spinbutt.h>
#include "Common.h"
#include "CommonPaths.h"
@ -24,11 +25,15 @@
#include "Core.h" // Core
#include "HW/EXI.h"
#include "HW/SI.h"
#include "HW/DSPHLE/DSPHLE.h"
#include "HW/DSPLLE/DSPLLE.h"
#include "Globals.h" // Local
#include "ConfigMain.h"
#include "PluginManager.h"
#include "ConfigManager.h"
#include "DSPHLEConfigDlg.h"
#include "DSPLLEConfigDlg.h"
#include "SysConf.h"
#include "Frame.h"
#include "HotkeyDlg.h"
@ -118,6 +123,9 @@ EVT_CHECKBOX(ID_DISPLAY_RENDERTOMAIN, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_DISPLAY_PROGSCAN, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_DISPLAY_NTSCJ, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_AUDIO_DSP_HLE, CConfigMain::AudioSettingsChanged)
EVT_BUTTON(ID_AUDIO_CONFIG, CConfigMain::OnDSPConfig)
EVT_CHECKBOX(ID_INTERFACE_CONFIRMSTOP, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_INTERFACE_USEPANICHANDLERS, CConfigMain::DisplaySettingsChanged)
EVT_RADIOBOX(ID_INTERFACE_THEME, CConfigMain::DisplaySettingsChanged)
@ -164,9 +172,6 @@ EVT_FILEPICKER_CHANGED(ID_APPLOADERPATH, CConfigMain::ApploaderPathChanged)
EVT_CHOICE(ID_GRAPHIC_CB, CConfigMain::OnSelectionChanged)
EVT_BUTTON(ID_GRAPHIC_CONFIG, CConfigMain::OnConfig)
EVT_CHOICE(ID_DSP_CB, CConfigMain::OnSelectionChanged)
EVT_BUTTON(ID_DSP_CONFIG, CConfigMain::OnConfig)
END_EVENT_TABLE()
CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
@ -211,6 +216,9 @@ void CConfigMain::UpdateGUI()
ProgressiveScan->Disable();
NTSCJ->Disable();
// Disable stuff on AudioPage
DSP_HLE->Disable();
DSPConfig->Disable();
// Disable stuff on GamecubePage
GCSystemLang->Disable();
@ -232,7 +240,6 @@ void CConfigMain::UpdateGUI()
// Disable stuff on PluginsPage
GraphicSelection->Disable();
DSPSelection->Disable();
}
}
@ -349,12 +356,17 @@ void CConfigMain::InitializeGUIValues()
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
Theme->SetSelection(startup_params.iTheme);
// need redesign
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++)
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++) {
if (langIds[i] == SConfig::GetInstance().m_InterfaceLanguage)
{
InterfaceLang->SetSelection(i);
break;
}
}
// Audio
DSP_HLE->SetValue(startup_params.bDSPHLE);
// Gamecube - IPL
GCSystemLang->SetSelection(startup_params.SelectedLanguage);
@ -389,7 +401,6 @@ void CConfigMain::InitializeGUIValues()
// Plugins
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, startup_params.m_strVideoPlugin);
FillChoiceBox(DSPSelection, PLUGIN_TYPE_DSP, startup_params.m_strDSPPlugin);
}
void CConfigMain::InitializeGUITooltips()
@ -424,11 +435,9 @@ void CConfigMain::InitializeGUITooltips()
InterfaceLang->SetToolTip(_("Change the language of the user interface.\nRequires restart."));
// Gamecube - Devices
GCEXIDevice[2]->SetToolTip(_("Serial Port 1 - This is the port which devices such as the net adapter use"));
// Wii - Devices
WiiKeyboard->SetToolTip(_("This could cause slow down in Wii Menu and some games."));
}
@ -441,6 +450,7 @@ void CConfigMain::CreateGUIControls()
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
DisplayPage = new wxPanel(Notebook, ID_DISPLAYPAGE, wxDefaultPosition, wxDefaultSize);
AudioPage = new wxPanel(Notebook, ID_AUDIOPAGE, wxDefaultPosition, wxDefaultSize);
GamecubePage = new wxPanel(Notebook, ID_GAMECUBEPAGE, wxDefaultPosition, wxDefaultSize);
WiiPage = new wxPanel(Notebook, ID_WIIPAGE, wxDefaultPosition, wxDefaultSize);
PathsPage = new wxPanel(Notebook, ID_PATHSPAGE, wxDefaultPosition, wxDefaultSize);
@ -448,6 +458,7 @@ void CConfigMain::CreateGUIControls()
Notebook->AddPage(GeneralPage, _("General"));
Notebook->AddPage(DisplayPage, _("Display"));
Notebook->AddPage(AudioPage, _("Audio"));
Notebook->AddPage(GamecubePage, _("Gamecube"));
Notebook->AddPage(WiiPage, _("Wii"));
Notebook->AddPage(PathsPage, _("Paths"));
@ -513,6 +524,14 @@ void CConfigMain::CreateGUIControls()
ConfirmStop = new wxCheckBox(DisplayPage, ID_INTERFACE_CONFIRMSTOP, _("Confirm On Stop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS, _("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
// Audio page
sAudioPage = new wxBoxSizer(wxVERTICAL);
DSP_HLE = new wxCheckBox(AudioPage, ID_AUDIO_DSP_HLE, _("DSP HLE emulation (fast)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
DSPConfig = new wxButton(AudioPage, ID_AUDIO_CONFIG, _("Configure DSP"), wxDefaultPosition, wxDefaultSize);
sAudioPage->Add(DSP_HLE);
sAudioPage->Add(DSPConfig);
AudioPage->SetSizer(sAudioPage);
// Themes - this should really be a wxChoice...
Theme = new wxRadioBox(DisplayPage, ID_INTERFACE_THEME, _("Theme"), wxDefaultPosition, wxDefaultSize, arrayStringFor_Themes, 1, wxRA_SPECIFY_ROWS);
@ -786,21 +805,13 @@ void CConfigMain::CreateGUIControls()
GraphicSelection = new wxChoice(PluginsPage, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator);
GraphicConfig = new wxButton(PluginsPage, ID_GRAPHIC_CONFIG, _("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
sbDSPPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginsPage, _("DSP"));
DSPSelection = new wxChoice(PluginsPage, ID_DSP_CB, wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator);
DSPConfig = new wxButton(PluginsPage, ID_DSP_CONFIG, _("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
// Populate the settings
sbGraphicsPlugin->Add(GraphicSelection, 1, wxEXPAND|wxALL, 5);
sbGraphicsPlugin->Add(GraphicConfig, 0, wxALL, 5);
sbDSPPlugin->Add(DSPSelection, 1, wxEXPAND|wxALL, 5);
sbDSPPlugin->Add(DSPConfig, 0, wxALL, 5);
// Populate the Plugins page
sPluginsPage = new wxBoxSizer(wxVERTICAL);
sPluginsPage->Add(sbGraphicsPlugin, 0, wxEXPAND|wxALL, 5);
sPluginsPage->Add(sbDSPPlugin, 0, wxEXPAND|wxALL, 5);
PluginsPage->SetSizer(sPluginsPage);
@ -947,6 +958,15 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
}
}
void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
{
switch (event.GetId())
{
case ID_AUDIO_DSP_HLE:
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = DSP_HLE->IsChecked();
break;
}
}
// GC settings
// -----------------------
@ -1122,9 +1142,6 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
}
// Paths settings
// -------------------
void CConfigMain::ISOPathsSelectionChanged(wxCommandEvent& WXUNUSED (event))
@ -1198,8 +1215,6 @@ void CConfigMain::OnSelectionChanged(wxCommandEvent& WXUNUSED (event))
// Update plugin filenames
if (GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin))
CPluginManager::GetInstance().FreeVideo();
if (GetFilename(DSPSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin))
CPluginManager::GetInstance().FreeDSP();
}
void CConfigMain::OnConfig(wxCommandEvent& event)
@ -1209,12 +1224,28 @@ void CConfigMain::OnConfig(wxCommandEvent& event)
case ID_GRAPHIC_CONFIG:
CallConfig(GraphicSelection);
break;
case ID_DSP_CONFIG:
CallConfig(DSPSelection);
}
}
void CConfigMain::OnDSPConfig(wxCommandEvent& event)
{
switch (event.GetId())
{
case ID_AUDIO_CONFIG:
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE) {
DSPConfigDialogHLE *dlg = new DSPConfigDialogHLE(this);
dlg->ShowModal();
dlg->Destroy();
} else {
DSPConfigDialogLLE *dlg = new DSPConfigDialogLLE(this);
dlg->ShowModal();
dlg->Destroy();
}
break;
}
}
void CConfigMain::CallConfig(wxChoice* _pChoice)
{
int Index = _pChoice->GetSelection();

View File

@ -20,6 +20,7 @@
#include <wx/wx.h>
#include <wx/gbsizer.h>
#include <wx/spinbutt.h>
#include <wx/notebook.h>
#include <wx/filepicker.h>
#include "ConfigManager.h"
@ -43,6 +44,7 @@ public:
void CloseClick(wxCommandEvent& event);
void OnSelectionChanged(wxCommandEvent& event);
void OnConfig(wxCommandEvent& event);
void OnDSPConfig(wxCommandEvent& event);
bool bRefreshList;
@ -51,6 +53,7 @@ private:
wxPanel* GeneralPage;
wxPanel* GamecubePage;
wxPanel* DisplayPage;
wxPanel* AudioPage;
wxPanel* WiiPage;
wxPanel* PathsPage;
wxPanel* PluginsPage;
@ -86,6 +89,11 @@ private:
wxCheckBox* ProgressiveScan;
wxCheckBox* NTSCJ;
// Audio
wxBoxSizer* sAudioPage; // GC settings
wxCheckBox* DSP_HLE;
wxButton* DSPConfig;
// Interface
wxCheckBox* ConfirmStop;
wxCheckBox* UsePanicHandlers;
@ -142,7 +150,6 @@ private:
wxDirPickerCtrl* DVDRoot;
wxFilePickerCtrl* ApploaderPath;
wxBoxSizer* sPluginsPage; // Plugins settings
wxStaticBoxSizer* sbGraphicsPlugin, *sbDSPPlugin; // Graphics, DSP sections
@ -150,10 +157,6 @@ private:
wxChoice* GraphicSelection;
wxButton* GraphicConfig;
// DSP
wxChoice* DSPSelection;
wxButton* DSPConfig;
wxButton* m_Ok;
FILE* pStream;
@ -174,6 +177,7 @@ private:
ID_NOTEBOOK = 1000,
ID_GENERALPAGE,
ID_DISPLAYPAGE,
ID_AUDIOPAGE,
ID_GAMECUBEPAGE,
ID_WIIPAGE,
ID_PATHSPAGE,
@ -202,6 +206,10 @@ private:
ID_DISPLAY_PROGSCAN,
ID_DISPLAY_NTSCJ,
// Audio Settings
ID_AUDIO_DSP_HLE,
ID_AUDIO_CONFIG,
// Interface settings
ID_INTERFACE_CONFIRMSTOP,
ID_INTERFACE_USEPANICHANDLERS,
@ -269,6 +277,8 @@ private:
void AddResolutions();
void OnSpin(wxSpinEvent& event);
void AudioSettingsChanged(wxCommandEvent& event);
void GCSettingsChanged(wxCommandEvent& event);
void ChooseMemcardPath(std::string& strMemcard, bool isSlotA);
void ChooseSIDevice(std::string deviceName, int deviceNum);

View File

@ -0,0 +1,186 @@
// Copyright (C) 2003 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include <vector>
#include <string>
#include "HW/DSPHLE/DSPHLE.h"
#include "DSPHLEConfigDlg.h"
BEGIN_EVENT_TABLE(DSPConfigDialogHLE, wxDialog)
EVT_BUTTON(wxID_OK, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogHLE::SettingsChanged)
EVT_CHOICE(ID_FREQUENCY, DSPConfigDialogHLE::SettingsChanged)
EVT_CHOICE(ID_BACKEND, DSPConfigDialogHLE::BackendChanged)
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogHLE::VolumeChanged)
END_EVENT_TABLE()
DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id,
const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
{
DSPHLE_LoadConfig();
wxButton *m_OK = new wxButton(this, wxID_OK, _("OK"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, _("Sound Settings"));
wxStaticBoxSizer *sbSettingsV = new wxStaticBoxSizer(wxVERTICAL, this, _("Volume"));
// Create items
m_buttonEnableDTKMusic = new wxCheckBox(this, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_buttonEnableThrottle = new wxCheckBox(this, ID_ENABLE_THROTTLE, _("Enable Audio Throttle"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxStaticText *FrequencyText = new wxStaticText(this, wxID_ANY, _("Sample Rate"),
wxDefaultPosition, wxDefaultSize, 0);
m_FrequencySelection = new wxChoice(this, ID_FREQUENCY, wxDefaultPosition, wxDefaultSize,
wxArrayRates, 0, wxDefaultValidator, wxEmptyString);
wxStaticText *BackendText = new wxStaticText(this, wxID_ANY, _("Audio Backend"),
wxDefaultPosition, wxDefaultSize, 0);
m_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxDefaultSize,
wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100,
wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);
m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
m_volumeText = new wxStaticText(this, wxID_ANY, wxString::Format(wxT("%d %%"),
ac_Config.m_Volume), wxDefaultPosition, wxDefaultSize, 0);
// Update values
m_buttonEnableDTKMusic->SetValue(ac_Config.m_EnableDTKMusic ? true : false);
m_buttonEnableThrottle->SetValue(ac_Config.m_EnableThrottle ? true : false);
// Add tooltips
m_buttonEnableDTKMusic->SetToolTip(_("This is used to play music tracks, like BGM."));
m_buttonEnableThrottle->SetToolTip(_("This is used to control game speed by sound throttle.\nDisabling this could cause abnormal game speed, such as too fast.\nBut sometimes enabling this could cause constant noise.\n\nKeyboard Shortcut <TAB>: Hold down to instantly disable Throttle."));
m_FrequencySelection->
SetToolTip(_("Changing this will have no effect while the emulator is running!"));
m_BackendSelection->
SetToolTip(_("Changing this will have no effect while the emulator is running!"));
// Create sizer and add items to dialog
wxBoxSizer *sMain = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *sSettings = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *sBackend = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *sFrequency = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *sButtons = new wxBoxSizer(wxHORIZONTAL);
sbSettings->Add(m_buttonEnableDTKMusic, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableThrottle, 0, wxALL, 5);
sFrequency->Add(FrequencyText, 0, wxALIGN_LEFT|wxALL, 1);
sFrequency->Add(m_FrequencySelection, 0, wxALL, 1);
m_FrequencySelection->Append(_("48,000 Hz"));
m_FrequencySelection->Append(_("32,000 Hz"));
int num = m_FrequencySelection->\
FindString(wxString::FromAscii(ac_Config.sFrequency.c_str()));
m_FrequencySelection->SetSelection(num);
sbSettings->Add(sFrequency, 0, wxALL, 7);
sBackend->Add(BackendText, 0, wxALIGN_LEFT|wxALL, 1);
sBackend->Add(m_BackendSelection, 0, wxALL, 1);
sbSettings->Add(sBackend, 0, wxALL, 7);
sbSettingsV->Add(m_volumeSlider, 1, wxLEFT|wxRIGHT|wxALIGN_CENTER, 6);
sbSettingsV->Add(m_volumeText, 0, wxALL|wxALIGN_LEFT, 4);
sSettings->Add(sbSettings, 0, wxALL|wxEXPAND, 4);
sSettings->Add(sbSettingsV, 0, wxALL|wxEXPAND, 4);
sMain->Add(sSettings, 0, wxALL|wxEXPAND, 4);
sButtons->AddStretchSpacer();
sButtons->Add(m_OK, 0, wxALL, 1);
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
SetSizerAndFit(sMain);
// add backends
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
for (std::vector<std::string>::const_iterator iter = backends.begin();
iter != backends.end(); ++iter)
{
AddBackend((*iter).c_str());
}
// Center window
CenterOnParent();
}
// Add audio output options
void DSPConfigDialogHLE::AddBackend(const char* backend)
{
// Update values
m_BackendSelection->Append(wxString::FromAscii(backend));
int num = m_BackendSelection->\
FindString(wxString::FromAscii(ac_Config.sBackend.c_str()));
m_BackendSelection->SetSelection(num);
}
void DSPConfigDialogHLE::ClearBackends()
{
m_BackendSelection->Clear();
}
DSPConfigDialogHLE::~DSPConfigDialogHLE()
{
}
void DSPConfigDialogHLE::VolumeChanged(wxScrollEvent& WXUNUSED(event))
{
ac_Config.m_Volume = m_volumeSlider->GetValue();
ac_Config.Update();
m_volumeText->SetLabel(wxString::Format(wxT("%d %%"), m_volumeSlider->GetValue()));
}
void DSPConfigDialogHLE::SettingsChanged(wxCommandEvent& event)
{
ac_Config.m_EnableDTKMusic = m_buttonEnableDTKMusic->GetValue();
ac_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
ac_Config.sBackend = m_BackendSelection->GetStringSelection().mb_str();
ac_Config.sFrequency = m_FrequencySelection->GetStringSelection().mb_str();
ac_Config.Update();
DSPHLE_SaveConfig();
if (event.GetId() == wxID_OK)
EndModal(wxID_OK);
}
bool DSPConfigDialogHLE::SupportsVolumeChanges(std::string backend)
{
//FIXME: this one should ask the backend whether it supports it.
// but getting the backend from string etc. is probably
// too much just to enable/disable a stupid slider...
return (backend == BACKEND_DIRECTSOUND ||
backend == BACKEND_COREAUDIO ||
backend == BACKEND_OPENAL ||
backend == BACKEND_XAUDIO2 ||
backend == BACKEND_PULSEAUDIO);
}
void DSPConfigDialogHLE::BackendChanged(wxCommandEvent& event)
{
m_volumeSlider->Enable(SupportsVolumeChanges(
std::string(m_BackendSelection->GetStringSelection().mb_str())));
}

View File

@ -0,0 +1,69 @@
// Copyright (C) 2003 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef __DSP_HLE_CONFIGDIALOG_h__
#define __DSP_HLE_CONFIGDIALOG_h__
#include <wx/wx.h>
#include <wx/dialog.h>
#include <wx/button.h>
#include <wx/statbox.h>
#include "AudioCommon.h"
class DSPConfigDialogHLE : public wxDialog
{
public:
DSPConfigDialogHLE(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString &title = _("DSP-HLE Settings"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
virtual ~DSPConfigDialogHLE();
void AddBackend(const char *backend);
void ClearBackends();
private:
DECLARE_EVENT_TABLE();
wxSlider* m_volumeSlider;
wxStaticText* m_volumeText;
wxCheckBox* m_buttonEnableDTKMusic;
wxCheckBox* m_buttonEnableThrottle;
wxArrayString wxArrayBackends;
wxArrayString wxArrayRates;
wxChoice* m_BackendSelection;
wxChoice* m_FrequencySelection;
enum
{
ID_ENABLE_HLE_AUDIO,
ID_ENABLE_DTK_MUSIC,
ID_ENABLE_THROTTLE,
ID_FREQUENCY,
ID_BACKEND,
ID_VOLUME
};
void OnOK(wxCommandEvent& event);
void SettingsChanged(wxCommandEvent& event);
void VolumeChanged(wxScrollEvent& event);
bool SupportsVolumeChanges(std::string backend);
void BackendChanged(wxCommandEvent& event);
};
#endif //__DSP_HLE_CONFIGDIALOG_h__

View File

@ -0,0 +1,159 @@
// Copyright (C) 2003 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include "HW/DSPLLE/DSPLLE.h"
#include "DSPLLEConfigDlg.h"
BEGIN_EVENT_TABLE(DSPConfigDialogLLE, wxDialog)
EVT_BUTTON(wxID_OK, DSPConfigDialogLLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogLLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogLLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_JIT, DSPConfigDialogLLE::SettingsChanged)
EVT_CHOICE(ID_BACKEND, DSPConfigDialogLLE::BackendChanged)
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogLLE::VolumeChanged)
END_EVENT_TABLE()
DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
{
DSPLLE_LoadConfig();
m_OK = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, _("Sound Settings"));
wxStaticBoxSizer *sbSettingsV = new wxStaticBoxSizer(wxVERTICAL, this, _("Volume"));
// Create items
m_buttonEnableDTKMusic = new wxCheckBox(this, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_buttonEnableThrottle = new wxCheckBox(this, ID_ENABLE_THROTTLE, _("Enable Audio Throttle"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_buttonEnableJIT = new wxCheckBox(this, ID_ENABLE_JIT, _("Enable JIT Dynarec"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxStaticText *BackendText = new wxStaticText(this, wxID_ANY, _("Audio Backend"), wxDefaultPosition, wxDefaultSize, 0);
m_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
m_volumeText = new wxStaticText(this, wxID_ANY, wxString::Format(wxT("%d %%"), ac_Config.m_Volume), wxDefaultPosition, wxDefaultSize, 0);
// Update values
m_buttonEnableDTKMusic->SetValue(ac_Config.m_EnableDTKMusic ? true : false);
m_buttonEnableThrottle->SetValue(ac_Config.m_EnableThrottle ? true : false);
m_buttonEnableJIT->SetValue(ac_Config.m_EnableJIT ? true : false);
// Add tooltips
m_buttonEnableDTKMusic->SetToolTip(_("This is used to play music tracks, like BGM."));
m_buttonEnableThrottle->SetToolTip(_("This is used to control game speed by sound throttle.\nDisabling this could cause abnormal game speed, such as too fast.\nBut sometimes enabling this could cause constant noise.\n\nKeyboard Shortcut <TAB>: Hold down to instantly disable Throttle."));
m_buttonEnableJIT->SetToolTip(_("Enables dynamic recompilation of DSP code.\nChanging this will have no effect while the emulator is running!"));
m_BackendSelection->SetToolTip(_("Changing this will have no effect while the emulator is running!"));
// Create sizer and add items to dialog
wxBoxSizer *sMain = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *sSettings = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *sBackend = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *sButtons = new wxBoxSizer(wxHORIZONTAL);
sbSettings->Add(m_buttonEnableDTKMusic, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableThrottle, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableJIT, 0, wxALL, 5);
sBackend->Add(BackendText, 0, wxALIGN_CENTER|wxALL, 5);
sBackend->Add(m_BackendSelection, 0, wxALL, 1);
sbSettings->Add(sBackend, 0, wxALL, 2);
sbSettingsV->Add(m_volumeSlider, 1, wxLEFT|wxRIGHT|wxALIGN_CENTER, 6);
sbSettingsV->Add(m_volumeText, 0, wxALL|wxALIGN_LEFT, 4);
sSettings->Add(sbSettings, 0, wxALL|wxEXPAND, 4);
sSettings->Add(sbSettingsV, 0, wxALL|wxEXPAND, 4);
sMain->Add(sSettings, 0, wxALL|wxEXPAND, 4);
sButtons->AddStretchSpacer();
sButtons->Add(m_OK, 0, wxALL, 1);
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
SetSizerAndFit(sMain);
// add backends
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
for (std::vector<std::string>::const_iterator iter = backends.begin();
iter != backends.end(); ++iter)
{
AddBackend((*iter).c_str());
}
// Center window
CenterOnParent();
}
// Add audio output options
void DSPConfigDialogLLE::AddBackend(const char* backend)
{
// Update value
m_BackendSelection->Append(wxString::FromAscii(backend));
int num = m_BackendSelection->\
FindString(wxString::FromAscii(ac_Config.sBackend.c_str()));
m_BackendSelection->SetSelection(num);
}
void DSPConfigDialogLLE::ClearBackends()
{
m_BackendSelection->Clear();
}
DSPConfigDialogLLE::~DSPConfigDialogLLE()
{
}
void DSPConfigDialogLLE::VolumeChanged(wxScrollEvent& WXUNUSED(event))
{
ac_Config.m_Volume = m_volumeSlider->GetValue();
ac_Config.Update();
m_volumeText->SetLabel(wxString::Format(wxT("%d %%"), m_volumeSlider->GetValue()));
}
void DSPConfigDialogLLE::SettingsChanged(wxCommandEvent& event)
{
ac_Config.m_EnableDTKMusic = m_buttonEnableDTKMusic->GetValue();
ac_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
ac_Config.m_EnableJIT = m_buttonEnableJIT->GetValue();
ac_Config.sBackend = m_BackendSelection->GetStringSelection().mb_str();
ac_Config.Update();
DSPLLE_SaveConfig();
if (event.GetId() == wxID_OK)
EndModal(wxID_OK);
}
bool DSPConfigDialogLLE::SupportsVolumeChanges(std::string backend)
{
//FIXME: this one should ask the backend whether it supports it.
// but getting the backend from string etc. is probably
// too much just to enable/disable a stupid slider...
return (backend == BACKEND_DIRECTSOUND ||
backend == BACKEND_COREAUDIO ||
backend == BACKEND_OPENAL ||
backend == BACKEND_XAUDIO2 ||
backend == BACKEND_PULSEAUDIO);
}
void DSPConfigDialogLLE::BackendChanged(wxCommandEvent& event)
{
m_volumeSlider->Enable(SupportsVolumeChanges(std::string(m_BackendSelection->GetStringSelection().mb_str())));
}

View File

@ -0,0 +1,69 @@
// Copyright (C) 2003 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef __DSP_LLE_CONFIGDIALOG_h__
#define __DSP_LLE_CONFIGDIALOG_h__
#include <wx/wx.h>
#include <wx/dialog.h>
#include <wx/button.h>
#include <wx/statbox.h>
#include "AudioCommon.h"
class DSPConfigDialogLLE : public wxDialog
{
public:
DSPConfigDialogLLE(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString &title = _("DSP-LLE Settings"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
virtual ~DSPConfigDialogLLE();
void AddBackend(const char *backend);
void ClearBackends();
private:
DECLARE_EVENT_TABLE();
wxSlider *m_volumeSlider;
wxStaticText *m_volumeText;
wxButton *m_OK;
wxCheckBox *m_buttonEnableDTKMusic;
wxCheckBox *m_buttonEnableThrottle;
wxCheckBox *m_buttonEnableJIT;
wxArrayString wxArrayBackends;
wxChoice *m_BackendSelection;
enum
{
ID_ENABLE_DTK_MUSIC,
ID_ENABLE_THROTTLE,
ID_ENABLE_JIT,
ID_BACKEND,
ID_VOLUME
};
void OnOK(wxCommandEvent& event);
void SettingsChanged(wxCommandEvent& event);
void VolumeChanged(wxScrollEvent& event);
bool SupportsVolumeChanges(std::string backend);
void BackendChanged(wxCommandEvent& event);
};
#endif //__DSP_LLE_CONFIGDIALOG_h__

View File

@ -195,7 +195,7 @@ void CFrame::OnToggleWindow(wxCommandEvent& event)
g_pCodeWindow->ToggleJitWindow(bShow);
break;
case IDM_SOUNDWINDOW:
g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, bShow);
g_pCodeWindow->ToggleSoundWindow(bShow);
break;
case IDM_VIDEOWINDOW:
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, bShow);

View File

@ -44,6 +44,8 @@ Core::GetWindowHandle().
#include "CheatsWindow.h"
#include "LuaWindow.h"
#include "AboutDolphin.h"
#include "DSPHLEConfigDlg.h"
#include "DSPLLEConfigDlg.h"
#include "GameListCtrl.h"
#include "BootManager.h"
#include "LogWindow.h"
@ -1059,18 +1061,15 @@ void CFrame::OnPluginGFX(wxCommandEvent& WXUNUSED (event))
void CFrame::OnPluginDSP(wxCommandEvent& WXUNUSED (event))
{
#ifdef _WIN32
Disable(); // Fake a modal dialog
#endif
CPluginManager::GetInstance().OpenConfig(
this,
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str(),
PLUGIN_TYPE_DSP
);
#ifdef _WIN32
Enable();
Raise();
#endif
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE) {
DSPConfigDialogHLE *dlg = new DSPConfigDialogHLE(this);
dlg->ShowModal();
dlg->Destroy();
} else {
DSPConfigDialogLLE *dlg = new DSPConfigDialogLLE(this);
dlg->ShowModal();
dlg->Destroy();
}
}
void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event))

View File

@ -19,8 +19,8 @@
// This file holds global data for DolphinWx and DebuggerWx
#ifndef _GLOBALS_H
#define _GLOBALS_H
#ifndef _WX_GLOBALS_H
#define _WX_GLOBALS_H
#include "Common.h"
@ -273,4 +273,4 @@ enum
extern const wxEventType wxEVT_HOST_COMMAND;
#endif // _GLOBALS_H
#endif // _WX_GLOBALS_H

View File

@ -290,10 +290,6 @@ bool DolphinApp::OnInit()
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin =
std::string(videoPluginFilename.mb_str());
if (selectAudioPlugin && audioPluginFilename != wxEmptyString)
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin =
std::string(audioPluginFilename.mb_str());
// Enable the PNG image handler for screenshots
wxImage::AddHandler(new wxPNGHandler);