From 473fea7e4aabceadb96910ef409cba41b0198d86 Mon Sep 17 00:00:00 2001 From: Frank-74 Date: Mon, 21 Jan 2019 08:35:42 +0000 Subject: [PATCH] [Project64-Audio] Remove round frequencies --- Source/Project64-audio/AudioMain.cpp | 4 ---- Source/Project64-audio/AudioSettings.cpp | 10 ---------- Source/Project64-audio/AudioSettings.h | 3 --- Source/Project64-audio/ConfigUI.cpp | 6 ------ Source/Project64-audio/Project64-audio.rc | 1 - Source/Project64-audio/SettingsID.h | 1 - Source/Project64-audio/resource.h | 5 ++--- 7 files changed, 2 insertions(+), 28 deletions(-) diff --git a/Source/Project64-audio/AudioMain.cpp b/Source/Project64-audio/AudioMain.cpp index 31586b622..c410270a9 100644 --- a/Source/Project64-audio/AudioMain.cpp +++ b/Source/Project64-audio/AudioMain.cpp @@ -124,10 +124,6 @@ EXPORT void CALL AiDacrateChanged(int SystemType) if (hack == 'BH' && SystemType != SYSTEM_PAL) BufferSize -= 16; - if (g_settings->RoundFreq()) - { - Frequency = ((Frequency / 25) + 1) * 25; - } WriteTrace(TraceAudioDriver, TraceInfo, "Frequency = %d", Frequency); WriteTrace(TraceAudioDriver, TraceInfo, "Divider = %.3f", (double)divider); WriteTrace(TraceAudioDriver, TraceInfo, "Buffer = %d", g_settings->GetBuffer()); diff --git a/Source/Project64-audio/AudioSettings.cpp b/Source/Project64-audio/AudioSettings.cpp index 68a45109c..9eb19c3e5 100644 --- a/Source/Project64-audio/AudioSettings.cpp +++ b/Source/Project64-audio/AudioSettings.cpp @@ -32,7 +32,6 @@ CSettings::CSettings() : m_debugger_enabled(false), m_Volume(100), m_Buffer(4), - m_RoundFreq(false), m_FixedAudio(false), m_SyncAudio(false), m_FullSpeed(true) @@ -51,7 +50,6 @@ CSettings::CSettings() : if (m_Set_LimitFPS != 0) { SettingsRegisterChange(true, m_Set_LimitFPS, this, stSettingsChanged); } SettingsRegisterChange(false, Set_Volume, this, stSettingsChanged); SettingsRegisterChange(false, Set_Buffer, this, stSettingsChanged); - SettingsRegisterChange(false, Set_RoundFreq, this, stSettingsChanged); SettingsRegisterChange(false, Set_Logging_MD5, this, stLogLevelChanged); SettingsRegisterChange(false, Set_Logging_Thread, this, stLogLevelChanged); @@ -73,7 +71,6 @@ CSettings::~CSettings() if (m_Set_LimitFPS != 0) { SettingsUnregisterChange(true, m_Set_LimitFPS, this, stSettingsChanged); } SettingsUnregisterChange(false, Set_Volume, this, stSettingsChanged); SettingsUnregisterChange(false, Set_Buffer, this, stSettingsChanged); - SettingsUnregisterChange(false, Set_RoundFreq, this, stSettingsChanged); SettingsUnregisterChange(false, Set_Logging_MD5, this, stLogLevelChanged); SettingsUnregisterChange(false, Set_Logging_Thread, this, stLogLevelChanged); @@ -105,7 +102,6 @@ void CSettings::RegisterSettings(void) RegisterSetting(Set_Logging_InitShutdown, Data_DWORD_General, "InitShutdown", "Logging", g_ModuleLogLevel[TraceAudioInitShutdown], NULL); RegisterSetting(Set_Logging_Interface, Data_DWORD_General, "Interface", "Logging", g_ModuleLogLevel[TraceAudioInterface], NULL); RegisterSetting(Set_Logging_Driver, Data_DWORD_General, "Driver", "Logging", g_ModuleLogLevel[TraceAudioDriver], NULL); - RegisterSetting(Set_RoundFreq, Data_DWORD_General, "RoundFrequency", "Settings", (bool)false, NULL); RegisterSetting(Set_Buffer, Data_DWORD_Game, "Buffer", "", 4, NULL); LogLevelChanged(); } @@ -139,11 +135,6 @@ void CSettings::SetBuffer(uint32_t Buffer) SetSetting(Set_Buffer, Buffer); } -void CSettings::SetRoundFreq(bool RoundFreq) -{ - SetSetting(Set_RoundFreq, RoundFreq ? 1 : 0); -} - void CSettings::LogLevelChanged(void) { g_ModuleLogLevel[TraceMD5] = GetSetting(Set_Logging_MD5); @@ -161,7 +152,6 @@ void CSettings::ReadSettings(void) m_AudioEnabled = m_Set_EnableAudio ? GetSystemSetting(m_Set_EnableAudio) != 0 : true; m_advanced_options = m_Set_basic_mode ? GetSystemSetting(m_Set_basic_mode) == 0 : false; m_debugger_enabled = m_advanced_options && m_Set_debugger ? GetSystemSetting(m_Set_debugger) == 1 : false; - m_RoundFreq = GetSetting(Set_RoundFreq) != 0; m_Buffer = GetSetting(Set_Buffer); m_FullSpeed = m_Set_FullSpeed ? GetSystemSetting(m_Set_FullSpeed) != 0 : false; m_FixedAudio = m_Set_FixedAudio ? GetSystemSetting(m_Set_FixedAudio) != 0 : false; diff --git a/Source/Project64-audio/AudioSettings.h b/Source/Project64-audio/AudioSettings.h index f6e1e4bbb..425f7822a 100644 --- a/Source/Project64-audio/AudioSettings.h +++ b/Source/Project64-audio/AudioSettings.h @@ -20,7 +20,6 @@ public: inline bool debugger_enabled(void) const { return m_debugger_enabled; } inline uint32_t GetVolume(void) const { return m_Volume; } inline uint32_t GetBuffer(void) const { return m_Buffer; } - inline bool RoundFreq(void) const { return m_RoundFreq; } inline bool FixedAudio(void) const { return m_FixedAudio; } inline bool SyncAudio(void) const { return m_SyncAudio; } inline bool FullSpeed(void) const { return m_FullSpeed; } @@ -31,7 +30,6 @@ public: void SetAudioEnabled(bool Enabled); void SetVolume(uint32_t Volume); void SetBuffer(uint32_t Buffer); - void SetRoundFreq(bool RoundFreq); void ReadSettings(); private: @@ -64,7 +62,6 @@ private: bool m_debugger_enabled; uint32_t m_Volume; uint32_t m_Buffer; - bool m_RoundFreq; bool m_FixedAudio; bool m_SyncAudio; bool m_FullSpeed; diff --git a/Source/Project64-audio/ConfigUI.cpp b/Source/Project64-audio/ConfigUI.cpp index 6be994db1..a14ecdb1a 100644 --- a/Source/Project64-audio/ConfigUI.cpp +++ b/Source/Project64-audio/ConfigUI.cpp @@ -54,7 +54,6 @@ public: BEGIN_MSG_MAP(CDebugSettings) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) COMMAND_ID_HANDLER_EX(IDC_MUTE, ItemChanged) - COMMAND_ID_HANDLER_EX(IDC_ROUND, ItemChanged) NOTIFY_HANDLER_EX(IDC_VOLUME, NM_RELEASEDCAPTURE, ItemChangedNotify); CHAIN_MSG_MAP(CPropertyPageImpl) END_MSG_MAP() @@ -69,8 +68,6 @@ public: m_Volume.SetTicFreq(20); m_Volume.SetRangeMin(0); m_Volume.SetRangeMax(100); - m_btnRound.Attach(GetDlgItem(IDC_ROUND)); - m_btnRound.SetCheck(g_settings->RoundFreq() ? BST_CHECKED : BST_UNCHECKED); return TRUE; } @@ -78,7 +75,6 @@ public: { g_settings->SetAudioEnabled(m_btnMute.GetCheck() != BST_CHECKED); g_settings->SetVolume(100 - m_Volume.GetPos()); - g_settings->SetRoundFreq(m_btnRound.GetCheck() == BST_CHECKED); FlushSettings(); return true; } @@ -93,12 +89,10 @@ private: void ItemChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/) { SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0); - g_settings->SetRoundFreq(m_btnRound.GetCheck() == BST_CHECKED); } CTrackBarCtrl m_Volume; CButton m_btnMute; - CButton m_btnRound; }; class CGameSettings : diff --git a/Source/Project64-audio/Project64-audio.rc b/Source/Project64-audio/Project64-audio.rc index a463ff729..58080c98c 100644 --- a/Source/Project64-audio/Project64-audio.rc +++ b/Source/Project64-audio/Project64-audio.rc @@ -58,7 +58,6 @@ BEGIN CONTROL "",IDC_VOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_VERT | TBS_BOTH | WS_BORDER | WS_TABSTOP,8,14,32,67,WS_EX_STATICEDGE GROUPBOX "Volume",IDC_STATIC,3,3,45,94 CONTROL "Mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,83,32,10 - CONTROL "Rounded Frequencies",IDC_ROUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,103,85,10 END IDD_LOG_SETTINGS DIALOGEX 0, 0, 311, 177 diff --git a/Source/Project64-audio/SettingsID.h b/Source/Project64-audio/SettingsID.h index bf89bdde4..884d082f8 100644 --- a/Source/Project64-audio/SettingsID.h +++ b/Source/Project64-audio/SettingsID.h @@ -21,5 +21,4 @@ enum Set_Logging_Interface, Set_Logging_Driver, Set_Buffer, - Set_RoundFreq, }; diff --git a/Source/Project64-audio/resource.h b/Source/Project64-audio/resource.h index 29835e231..58effa34e 100644 --- a/Source/Project64-audio/resource.h +++ b/Source/Project64-audio/resource.h @@ -12,8 +12,7 @@ #define IDC_VOLUME 1001 #define IDC_MUTE 1002 #define IDC_BUFFER 1003 -#define IDC_ROUND 1004 -#define IDC_BUFFERTEXT 1005 +#define IDC_BUFFERTEXT 1004 #define IDC_CMB_TRACE_PATH 1019 #define IDC_CMB_TRACE_INIT_SHUTDOWN 1020 #define IDC_CMB_TRACE_INTERFACE 1021 @@ -32,7 +31,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 105 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1006 +#define _APS_NEXT_CONTROL_VALUE 1005 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif