mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-03 20:54:28 +00:00
Added Enable Other Audio option to DSP HLE
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1233 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8a77ca8189
commit
f1e8b46c6c
@ -314,7 +314,7 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
|
|||||||
GetHandle(),
|
GetHandle(),
|
||||||
_LocalCoreStartupParameter.m_strVideoPlugin.c_str(),
|
_LocalCoreStartupParameter.m_strVideoPlugin.c_str(),
|
||||||
true, true
|
true, true
|
||||||
);
|
);
|
||||||
} // don't have any else, just ignore it
|
} // don't have any else, just ignore it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,5 +870,9 @@
|
|||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
|
<Global
|
||||||
|
Name="RESOURCE_FILE"
|
||||||
|
Value="Src\resource.rc"
|
||||||
|
/>
|
||||||
</Globals>
|
</Globals>
|
||||||
</VisualStudioProject>
|
</VisualStudioProject>
|
||||||
|
@ -43,33 +43,38 @@ void CConfig::Load()
|
|||||||
|
|
||||||
IniFile file;
|
IniFile file;
|
||||||
file.Load(FULL_CONFIG_DIR "DSP.ini");
|
file.Load(FULL_CONFIG_DIR "DSP.ini");
|
||||||
file.Get("Config", "EnableHLEAudio", &m_EnableHLEAudio, true);
|
file.Get("Config", "EnableHLEAudio", &m_EnableHLEAudio, true); // Sound Settings
|
||||||
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
|
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
|
||||||
|
file.Get("Config", "EnableThrottle", &m_EnableThrottle, true);
|
||||||
file.Get("Config", "Interpolation", &m_Interpolation, true);
|
file.Get("Config", "Interpolation", &m_Interpolation, true);
|
||||||
file.Get("Config", "DumpSamples", &m_DumpSamples, false);
|
file.Get("Config", "AntiGap", &m_AntiGap, false);
|
||||||
|
|
||||||
|
file.Get("Config", "DumpSamples", &m_DumpSamples, false); // Sample Dumping
|
||||||
file.Get("Config", "DumpSampleMinLength", &m_DumpSampleMinLength, true);
|
file.Get("Config", "DumpSampleMinLength", &m_DumpSampleMinLength, true);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
file.Get("Config", "DumpSamplePath", &m_szSamplePath, "C:\\");
|
file.Get("Config", "DumpSamplePath", &m_szSamplePath, "C:\\");
|
||||||
#else
|
#else
|
||||||
file.Get("Config", "DumpSamplePath", &m_szSamplePath, "/dev/null/");
|
file.Get("Config", "DumpSamplePath", &m_szSamplePath, "/dev/null/");
|
||||||
#endif
|
#endif
|
||||||
file.Get("Config", "AntiGap", &m_AntiGap, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfig::Save()
|
void CConfig::Save()
|
||||||
{
|
{
|
||||||
IniFile file;
|
IniFile file;
|
||||||
file.Load(FULL_CONFIG_DIR "DSP.ini");
|
file.Load(FULL_CONFIG_DIR "DSP.ini");
|
||||||
file.Set("Config", "EnableHLEAudio", m_EnableHLEAudio);
|
file.Set("Config", "EnableHLEAudio", m_EnableHLEAudio); // Sound Settings
|
||||||
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
|
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
|
||||||
|
file.Set("Config", "EnableThrottle", m_EnableThrottle);
|
||||||
file.Set("Config", "Interpolation", m_Interpolation);
|
file.Set("Config", "Interpolation", m_Interpolation);
|
||||||
file.Set("Config", "DumpSamples", m_DumpSamples);
|
file.Set("Config", "AntiGap", m_AntiGap);
|
||||||
|
|
||||||
|
file.Set("Config", "DumpSamples", m_DumpSamples); // Sample Dumping
|
||||||
file.Set("Config", "DumpSampleMinLength", m_DumpSampleMinLength);
|
file.Set("Config", "DumpSampleMinLength", m_DumpSampleMinLength);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
file.Set("Config", "DumpSamplePath", m_szSamplePath);
|
file.Set("Config", "DumpSamplePath", m_szSamplePath);
|
||||||
#else
|
#else
|
||||||
file.Set("Config", "DumpSamplePath", m_szSamplePath);
|
file.Set("Config", "DumpSamplePath", m_szSamplePath);
|
||||||
#endif
|
#endif
|
||||||
file.Set("Config", "AntiGap", m_AntiGap);
|
|
||||||
file.Save(FULL_CONFIG_DIR "DSP.ini");
|
file.Save(FULL_CONFIG_DIR "DSP.ini");
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ struct CConfig
|
|||||||
bool m_AntiGap;
|
bool m_AntiGap;
|
||||||
bool m_EnableHLEAudio;
|
bool m_EnableHLEAudio;
|
||||||
bool m_EnableDTKMusic;
|
bool m_EnableDTKMusic;
|
||||||
|
bool m_EnableThrottle;
|
||||||
bool m_Interpolation;
|
bool m_Interpolation;
|
||||||
bool m_DumpSamples;
|
bool m_DumpSamples;
|
||||||
std::string m_szSamplePath;
|
std::string m_szSamplePath;
|
||||||
|
@ -23,18 +23,26 @@
|
|||||||
LRESULT
|
LRESULT
|
||||||
CConfigDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
CConfigDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||||
{
|
{
|
||||||
|
// Load config settings
|
||||||
g_Config.Load();
|
g_Config.Load();
|
||||||
|
|
||||||
|
// Center window
|
||||||
//CenterWindow(this->GetParent());
|
//CenterWindow(this->GetParent());
|
||||||
CenterWindow(GetParent());
|
CenterWindow(GetParent());
|
||||||
|
|
||||||
|
// Get button handles
|
||||||
m_buttonEnableHLEAudio = GetDlgItem(IDC_ENABLE_HLE_AUDIO);
|
m_buttonEnableHLEAudio = GetDlgItem(IDC_ENABLE_HLE_AUDIO);
|
||||||
m_buttonEnableDTKMusic = GetDlgItem(IDC_ENABLE_DTK_MUSIC);
|
m_buttonEnableDTKMusic = GetDlgItem(IDC_ENABLE_DTK_MUSIC);
|
||||||
|
m_buttonEnableThrottle = GetDlgItem(IDC_ENABLE_THROTTLE);
|
||||||
m_buttonAntiGap = GetDlgItem(IDC_ANTIGAP);
|
m_buttonAntiGap = GetDlgItem(IDC_ANTIGAP);
|
||||||
m_buttonDumpSamples = GetDlgItem(IDC_DUMPSAMPLES);
|
m_buttonDumpSamples = GetDlgItem(IDC_DUMPSAMPLES);
|
||||||
m_editDumpSamplePath = GetDlgItem(IDC_SAMPLEDUMPPATH);
|
m_editDumpSamplePath = GetDlgItem(IDC_SAMPLEDUMPPATH);
|
||||||
m_comboSampleRate = GetDlgItem(IDC_SAMPLERATE);
|
m_comboSampleRate = GetDlgItem(IDC_SAMPLERATE);
|
||||||
|
|
||||||
|
// Update checkboxes
|
||||||
m_buttonEnableHLEAudio.SetCheck(g_Config.m_EnableHLEAudio ? BST_CHECKED : BST_UNCHECKED);
|
m_buttonEnableHLEAudio.SetCheck(g_Config.m_EnableHLEAudio ? BST_CHECKED : BST_UNCHECKED);
|
||||||
m_buttonEnableDTKMusic.SetCheck(g_Config.m_EnableDTKMusic ? BST_CHECKED : BST_UNCHECKED);
|
m_buttonEnableDTKMusic.SetCheck(g_Config.m_EnableDTKMusic ? BST_CHECKED : BST_UNCHECKED);
|
||||||
|
m_buttonEnableThrottle.SetCheck(g_Config.m_EnableThrottle ? BST_CHECKED : BST_UNCHECKED);
|
||||||
m_buttonAntiGap.SetCheck(g_Config.m_AntiGap ? BST_CHECKED : BST_UNCHECKED);
|
m_buttonAntiGap.SetCheck(g_Config.m_AntiGap ? BST_CHECKED : BST_UNCHECKED);
|
||||||
m_buttonDumpSamples.SetCheck(g_Config.m_DumpSamples ? BST_CHECKED : BST_UNCHECKED);
|
m_buttonDumpSamples.SetCheck(g_Config.m_DumpSamples ? BST_CHECKED : BST_UNCHECKED);
|
||||||
m_editDumpSamplePath.SetWindowText(g_Config.m_szSamplePath.c_str());
|
m_editDumpSamplePath.SetWindowText(g_Config.m_szSamplePath.c_str());
|
||||||
@ -49,10 +57,12 @@ CConfigDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BO
|
|||||||
LRESULT
|
LRESULT
|
||||||
CConfigDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
CConfigDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||||
{
|
{
|
||||||
|
// Save settings
|
||||||
if (wID == IDOK)
|
if (wID == IDOK)
|
||||||
{
|
{
|
||||||
g_Config.m_EnableHLEAudio = (m_buttonEnableHLEAudio.GetCheck() == BST_CHECKED) ? true : false;
|
g_Config.m_EnableHLEAudio = (m_buttonEnableHLEAudio.GetCheck() == BST_CHECKED) ? true : false;
|
||||||
g_Config.m_EnableDTKMusic = (m_buttonEnableDTKMusic.GetCheck() == BST_CHECKED) ? true : false;
|
g_Config.m_EnableDTKMusic = (m_buttonEnableDTKMusic.GetCheck() == BST_CHECKED) ? true : false;
|
||||||
|
g_Config.m_EnableThrottle = (m_buttonEnableThrottle.GetCheck() == BST_CHECKED) ? true : false;
|
||||||
g_Config.m_DumpSamples = (m_buttonDumpSamples.GetCheck() == BST_CHECKED) ? true : false;
|
g_Config.m_DumpSamples = (m_buttonDumpSamples.GetCheck() == BST_CHECKED) ? true : false;
|
||||||
g_Config.m_AntiGap = (m_buttonAntiGap.GetCheck() == BST_CHECKED) ? true : false;
|
g_Config.m_AntiGap = (m_buttonAntiGap.GetCheck() == BST_CHECKED) ? true : false;
|
||||||
char temp[MAX_PATH];
|
char temp[MAX_PATH];
|
||||||
@ -68,3 +78,10 @@ CConfigDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT CConfigDlg::OnBnClickedEnableSpeedThrottle(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||||
|
{
|
||||||
|
// TODO: Add your control notification handler code here
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@ -28,12 +28,14 @@ class CConfigDlg
|
|||||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||||
COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
|
COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
|
||||||
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
|
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
|
||||||
|
COMMAND_HANDLER(IDC_ENABLE_SPEED_THROTTLE, BN_CLICKED, OnBnClickedEnableSpeedThrottle)
|
||||||
END_MSG_MAP()
|
END_MSG_MAP()
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
CButton m_buttonEnableHLEAudio;
|
CButton m_buttonEnableHLEAudio;
|
||||||
CButton m_buttonEnableDTKMusic;
|
CButton m_buttonEnableDTKMusic;
|
||||||
|
CButton m_buttonEnableThrottle;
|
||||||
CButton m_buttonDumpSamples;
|
CButton m_buttonDumpSamples;
|
||||||
CButton m_buttonAntiGap;
|
CButton m_buttonAntiGap;
|
||||||
CEdit m_editDumpSamplePath;
|
CEdit m_editDumpSamplePath;
|
||||||
@ -46,4 +48,6 @@ class CConfigDlg
|
|||||||
|
|
||||||
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
|
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
|
||||||
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
|
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
|
||||||
|
public:
|
||||||
|
LRESULT OnBnClickedEnableSpeedThrottle(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
||||||
};
|
};
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "../Config.h"
|
#include "../Config.h"
|
||||||
#include "../Globals.h"
|
#include "../Globals.h"
|
||||||
#include "../DSPHandler.h"
|
#include "../DSPHandler.h"
|
||||||
|
#include "../Logging/Console.h"
|
||||||
#include "Thread.h"
|
#include "Thread.h"
|
||||||
#include "Mixer.h"
|
#include "Mixer.h"
|
||||||
#include "FixedSizeQueue.h"
|
#include "FixedSizeQueue.h"
|
||||||
@ -99,12 +100,16 @@ void Mixer_PushSamples(short *buffer, int num_stereo_samples, int sample_rate) {
|
|||||||
static int acc=0;
|
static int acc=0;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (!GetAsyncKeyState(VK_TAB)) {
|
if (! (GetAsyncKeyState(VK_TAB)) && g_Config.m_EnableThrottle) {
|
||||||
|
|
||||||
|
/* This is only needed for non-AX sound, currently directly streamed and
|
||||||
|
DTK sound. For AX we call DSound_UpdateSound in AXTask() for example. */
|
||||||
while (queue_size > queue_maxlength / 2) {
|
while (queue_size > queue_maxlength / 2) {
|
||||||
DSound::DSound_UpdateSound();
|
DSound::DSound_UpdateSound();
|
||||||
Sleep(0);
|
Sleep(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
wprintf("Tab");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -9,14 +9,13 @@
|
|||||||
#define IDC_SAMPLERATE 1001
|
#define IDC_SAMPLERATE 1001
|
||||||
#define IDC_EDIT1 1002
|
#define IDC_EDIT1 1002
|
||||||
#define IDC_SAMPLEDUMPPATH 1002
|
#define IDC_SAMPLEDUMPPATH 1002
|
||||||
//#define IDC_CHECK1 1003 // these conflicted with CDebugger
|
|
||||||
#define IDC_ENABLE_AUDIO 1003
|
#define IDC_ENABLE_AUDIO 1003
|
||||||
#define IDC_ENABLE_HLE_AUDIO 1003
|
#define IDC_ENABLE_HLE_AUDIO 1003
|
||||||
//#define IDC_CHECK2 1004
|
|
||||||
#define IDC_ENABLE_DTK_MUSIC 1004
|
#define IDC_ENABLE_DTK_MUSIC 1004
|
||||||
#define IDC_DUMPSAMPLES 1005
|
#define IDC_DUMPSAMPLES 1005
|
||||||
#define IDC_SAMPLEMINLENGTH 1006
|
#define IDC_SAMPLEMINLENGTH 1006
|
||||||
#define IDC_BROWSE 1007
|
#define IDC_BROWSE 1007
|
||||||
|
#define IDC_ENABLE_THROTTLE 1008
|
||||||
#define IDC_ANTIGAP 1009
|
#define IDC_ANTIGAP 1009
|
||||||
#define IDC_CHECK3 1010
|
#define IDC_CHECK3 1010
|
||||||
|
|
||||||
|
@ -52,24 +52,26 @@ END
|
|||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
IDD_SETTINGS DIALOGEX 0, 0, 241, 138
|
IDD_SETTINGS DIALOGEX 0, 0, 281, 147
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Dolphin DSP-HLE Plugin Settings"
|
CAPTION "Dolphin DSP-HLE Plugin Settings"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,129,116,50,14
|
DEFPUSHBUTTON "OK",IDOK,171,126,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,184,116,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,225,126,50,14
|
||||||
GROUPBOX "&Sound settings",IDC_STATIC,7,7,227,45
|
GROUPBOX "&Sound settings",IDC_STATIC,7,7,267,57
|
||||||
EDITTEXT IDC_SAMPLEDUMPPATH,13,89,155,13,ES_AUTOHSCROLL | WS_DISABLED
|
EDITTEXT IDC_SAMPLEDUMPPATH,13,99,192,13,ES_AUTOHSCROLL | WS_DISABLED
|
||||||
CONTROL "&Enable HLE Audio",IDC_ENABLE_HLE_AUDIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,22,84,8
|
CONTROL "&Enable HLE Audio",IDC_ENABLE_HLE_AUDIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,22,84,8
|
||||||
GROUPBOX "Sample d&umping",IDC_STATIC,7,59,227,51
|
GROUPBOX "Sample d&umping",IDC_STATIC,7,69,267,51
|
||||||
CONTROL "Enab&le DTK Music",IDC_ENABLE_DTK_MUSIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,36,102,8
|
CONTROL "Enab&le DTK Music",IDC_ENABLE_DTK_MUSIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,36,102,8
|
||||||
CONTROL "&Dump all samples longer than",IDC_DUMPSAMPLES,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,13,73,105,9
|
CONTROL "&Dump all samples longer than",IDC_DUMPSAMPLES,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,13,83,105,9
|
||||||
EDITTEXT IDC_SAMPLEMINLENGTH,122,71,47,12,ES_AUTOHSCROLL | WS_DISABLED
|
EDITTEXT IDC_SAMPLEMINLENGTH,122,80,47,12,ES_AUTOHSCROLL | WS_DISABLED
|
||||||
LTEXT "seconds to:",IDC_STATIC,173,73,40,10
|
LTEXT "seconds to:",IDC_STATIC,173,83,40,10
|
||||||
PUSHBUTTON "&Browse...",IDC_BROWSE,173,89,54,14
|
PUSHBUTTON "&Browse...",IDC_BROWSE,213,99,54,14
|
||||||
CONTROL "&Anti-gap (dangerous!)",IDC_ANTIGAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,122,22,96,9
|
CONTROL "&Anti-gap (dangerous!)",IDC_ANTIGAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,22,96,9
|
||||||
CONTROL "&Reverb",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,122,36,89,10
|
CONTROL "&Reverb",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,147,36,89,10
|
||||||
|
CONTROL "Enable Other Audio (Speed Throttle)",IDC_ENABLE_THROTTLE,
|
||||||
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,132,10
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_ABOUT DIALOGEX 0, 0, 184, 65
|
IDD_ABOUT DIALOGEX 0, 0, 184, 65
|
||||||
@ -94,12 +96,12 @@ BEGIN
|
|||||||
IDD_SETTINGS, DIALOG
|
IDD_SETTINGS, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 234
|
RIGHTMARGIN, 274
|
||||||
VERTGUIDE, 13
|
VERTGUIDE, 13
|
||||||
VERTGUIDE, 122
|
VERTGUIDE, 147
|
||||||
VERTGUIDE, 168
|
VERTGUIDE, 168
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 131
|
BOTTOMMARGIN, 140
|
||||||
HORZGUIDE, 31
|
HORZGUIDE, 31
|
||||||
END
|
END
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user