[Project64-Audio] Remove round frequencies
This commit is contained in:
parent
21c73a5ee3
commit
473fea7e4a
|
@ -124,10 +124,6 @@ EXPORT void CALL AiDacrateChanged(int SystemType)
|
||||||
|
|
||||||
if (hack == 'BH' && SystemType != SYSTEM_PAL) BufferSize -= 16;
|
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, "Frequency = %d", Frequency);
|
||||||
WriteTrace(TraceAudioDriver, TraceInfo, "Divider = %.3f", (double)divider);
|
WriteTrace(TraceAudioDriver, TraceInfo, "Divider = %.3f", (double)divider);
|
||||||
WriteTrace(TraceAudioDriver, TraceInfo, "Buffer = %d", g_settings->GetBuffer());
|
WriteTrace(TraceAudioDriver, TraceInfo, "Buffer = %d", g_settings->GetBuffer());
|
||||||
|
|
|
@ -32,7 +32,6 @@ CSettings::CSettings() :
|
||||||
m_debugger_enabled(false),
|
m_debugger_enabled(false),
|
||||||
m_Volume(100),
|
m_Volume(100),
|
||||||
m_Buffer(4),
|
m_Buffer(4),
|
||||||
m_RoundFreq(false),
|
|
||||||
m_FixedAudio(false),
|
m_FixedAudio(false),
|
||||||
m_SyncAudio(false),
|
m_SyncAudio(false),
|
||||||
m_FullSpeed(true)
|
m_FullSpeed(true)
|
||||||
|
@ -51,7 +50,6 @@ CSettings::CSettings() :
|
||||||
if (m_Set_LimitFPS != 0) { SettingsRegisterChange(true, m_Set_LimitFPS, this, stSettingsChanged); }
|
if (m_Set_LimitFPS != 0) { SettingsRegisterChange(true, m_Set_LimitFPS, this, stSettingsChanged); }
|
||||||
SettingsRegisterChange(false, Set_Volume, this, stSettingsChanged);
|
SettingsRegisterChange(false, Set_Volume, this, stSettingsChanged);
|
||||||
SettingsRegisterChange(false, Set_Buffer, 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_MD5, this, stLogLevelChanged);
|
||||||
SettingsRegisterChange(false, Set_Logging_Thread, 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); }
|
if (m_Set_LimitFPS != 0) { SettingsUnregisterChange(true, m_Set_LimitFPS, this, stSettingsChanged); }
|
||||||
SettingsUnregisterChange(false, Set_Volume, this, stSettingsChanged);
|
SettingsUnregisterChange(false, Set_Volume, this, stSettingsChanged);
|
||||||
SettingsUnregisterChange(false, Set_Buffer, 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_MD5, this, stLogLevelChanged);
|
||||||
SettingsUnregisterChange(false, Set_Logging_Thread, 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_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_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_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);
|
RegisterSetting(Set_Buffer, Data_DWORD_Game, "Buffer", "", 4, NULL);
|
||||||
LogLevelChanged();
|
LogLevelChanged();
|
||||||
}
|
}
|
||||||
|
@ -139,11 +135,6 @@ void CSettings::SetBuffer(uint32_t Buffer)
|
||||||
SetSetting(Set_Buffer, Buffer);
|
SetSetting(Set_Buffer, Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSettings::SetRoundFreq(bool RoundFreq)
|
|
||||||
{
|
|
||||||
SetSetting(Set_RoundFreq, RoundFreq ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSettings::LogLevelChanged(void)
|
void CSettings::LogLevelChanged(void)
|
||||||
{
|
{
|
||||||
g_ModuleLogLevel[TraceMD5] = GetSetting(Set_Logging_MD5);
|
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_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_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_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_Buffer = GetSetting(Set_Buffer);
|
||||||
m_FullSpeed = m_Set_FullSpeed ? GetSystemSetting(m_Set_FullSpeed) != 0 : false;
|
m_FullSpeed = m_Set_FullSpeed ? GetSystemSetting(m_Set_FullSpeed) != 0 : false;
|
||||||
m_FixedAudio = m_Set_FixedAudio ? GetSystemSetting(m_Set_FixedAudio) != 0 : false;
|
m_FixedAudio = m_Set_FixedAudio ? GetSystemSetting(m_Set_FixedAudio) != 0 : false;
|
||||||
|
|
|
@ -20,7 +20,6 @@ public:
|
||||||
inline bool debugger_enabled(void) const { return m_debugger_enabled; }
|
inline bool debugger_enabled(void) const { return m_debugger_enabled; }
|
||||||
inline uint32_t GetVolume(void) const { return m_Volume; }
|
inline uint32_t GetVolume(void) const { return m_Volume; }
|
||||||
inline uint32_t GetBuffer(void) const { return m_Buffer; }
|
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 FixedAudio(void) const { return m_FixedAudio; }
|
||||||
inline bool SyncAudio(void) const { return m_SyncAudio; }
|
inline bool SyncAudio(void) const { return m_SyncAudio; }
|
||||||
inline bool FullSpeed(void) const { return m_FullSpeed; }
|
inline bool FullSpeed(void) const { return m_FullSpeed; }
|
||||||
|
@ -31,7 +30,6 @@ public:
|
||||||
void SetAudioEnabled(bool Enabled);
|
void SetAudioEnabled(bool Enabled);
|
||||||
void SetVolume(uint32_t Volume);
|
void SetVolume(uint32_t Volume);
|
||||||
void SetBuffer(uint32_t Buffer);
|
void SetBuffer(uint32_t Buffer);
|
||||||
void SetRoundFreq(bool RoundFreq);
|
|
||||||
void ReadSettings();
|
void ReadSettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -64,7 +62,6 @@ private:
|
||||||
bool m_debugger_enabled;
|
bool m_debugger_enabled;
|
||||||
uint32_t m_Volume;
|
uint32_t m_Volume;
|
||||||
uint32_t m_Buffer;
|
uint32_t m_Buffer;
|
||||||
bool m_RoundFreq;
|
|
||||||
bool m_FixedAudio;
|
bool m_FixedAudio;
|
||||||
bool m_SyncAudio;
|
bool m_SyncAudio;
|
||||||
bool m_FullSpeed;
|
bool m_FullSpeed;
|
||||||
|
|
|
@ -54,7 +54,6 @@ public:
|
||||||
BEGIN_MSG_MAP(CDebugSettings)
|
BEGIN_MSG_MAP(CDebugSettings)
|
||||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||||
COMMAND_ID_HANDLER_EX(IDC_MUTE, ItemChanged)
|
COMMAND_ID_HANDLER_EX(IDC_MUTE, ItemChanged)
|
||||||
COMMAND_ID_HANDLER_EX(IDC_ROUND, ItemChanged)
|
|
||||||
NOTIFY_HANDLER_EX(IDC_VOLUME, NM_RELEASEDCAPTURE, ItemChangedNotify);
|
NOTIFY_HANDLER_EX(IDC_VOLUME, NM_RELEASEDCAPTURE, ItemChangedNotify);
|
||||||
CHAIN_MSG_MAP(CPropertyPageImpl<CGeneralSettings>)
|
CHAIN_MSG_MAP(CPropertyPageImpl<CGeneralSettings>)
|
||||||
END_MSG_MAP()
|
END_MSG_MAP()
|
||||||
|
@ -69,8 +68,6 @@ public:
|
||||||
m_Volume.SetTicFreq(20);
|
m_Volume.SetTicFreq(20);
|
||||||
m_Volume.SetRangeMin(0);
|
m_Volume.SetRangeMin(0);
|
||||||
m_Volume.SetRangeMax(100);
|
m_Volume.SetRangeMax(100);
|
||||||
m_btnRound.Attach(GetDlgItem(IDC_ROUND));
|
|
||||||
m_btnRound.SetCheck(g_settings->RoundFreq() ? BST_CHECKED : BST_UNCHECKED);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +75,6 @@ public:
|
||||||
{
|
{
|
||||||
g_settings->SetAudioEnabled(m_btnMute.GetCheck() != BST_CHECKED);
|
g_settings->SetAudioEnabled(m_btnMute.GetCheck() != BST_CHECKED);
|
||||||
g_settings->SetVolume(100 - m_Volume.GetPos());
|
g_settings->SetVolume(100 - m_Volume.GetPos());
|
||||||
g_settings->SetRoundFreq(m_btnRound.GetCheck() == BST_CHECKED);
|
|
||||||
FlushSettings();
|
FlushSettings();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -93,12 +89,10 @@ private:
|
||||||
void ItemChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
void ItemChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||||
{
|
{
|
||||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||||
g_settings->SetRoundFreq(m_btnRound.GetCheck() == BST_CHECKED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CTrackBarCtrl m_Volume;
|
CTrackBarCtrl m_Volume;
|
||||||
CButton m_btnMute;
|
CButton m_btnMute;
|
||||||
CButton m_btnRound;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CGameSettings :
|
class CGameSettings :
|
||||||
|
|
|
@ -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
|
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
|
GROUPBOX "Volume",IDC_STATIC,3,3,45,94
|
||||||
CONTROL "Mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,83,32,10
|
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
|
END
|
||||||
|
|
||||||
IDD_LOG_SETTINGS DIALOGEX 0, 0, 311, 177
|
IDD_LOG_SETTINGS DIALOGEX 0, 0, 311, 177
|
||||||
|
|
|
@ -21,5 +21,4 @@ enum
|
||||||
Set_Logging_Interface,
|
Set_Logging_Interface,
|
||||||
Set_Logging_Driver,
|
Set_Logging_Driver,
|
||||||
Set_Buffer,
|
Set_Buffer,
|
||||||
Set_RoundFreq,
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
#define IDC_VOLUME 1001
|
#define IDC_VOLUME 1001
|
||||||
#define IDC_MUTE 1002
|
#define IDC_MUTE 1002
|
||||||
#define IDC_BUFFER 1003
|
#define IDC_BUFFER 1003
|
||||||
#define IDC_ROUND 1004
|
#define IDC_BUFFERTEXT 1004
|
||||||
#define IDC_BUFFERTEXT 1005
|
|
||||||
#define IDC_CMB_TRACE_PATH 1019
|
#define IDC_CMB_TRACE_PATH 1019
|
||||||
#define IDC_CMB_TRACE_INIT_SHUTDOWN 1020
|
#define IDC_CMB_TRACE_INIT_SHUTDOWN 1020
|
||||||
#define IDC_CMB_TRACE_INTERFACE 1021
|
#define IDC_CMB_TRACE_INTERFACE 1021
|
||||||
|
@ -32,7 +31,7 @@
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
#define _APS_NEXT_RESOURCE_VALUE 105
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1006
|
#define _APS_NEXT_CONTROL_VALUE 1005
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue