Remove legacy audio hack

This commit is contained in:
Margen67 2018-04-20 03:29:12 -07:00
parent 7bf2b7fed0
commit 7552e92060
7 changed files with 8 additions and 29 deletions

Binary file not shown.

Binary file not shown.

View File

@ -40,7 +40,7 @@
// ******************************************************************
// * func: XBAudio::XBAudio
// ******************************************************************
XBAudio::XBAudio() : m_bLegacyAudioHack(false), m_bPCM(true), m_bXADPCM(true), m_bUnknownCodec(true)
XBAudio::XBAudio() : m_bPCM(true), m_bXADPCM(true), m_bUnknownCodec(true)
{
m_binAudioAdapter = { 0 };
}
@ -70,9 +70,6 @@ void XBAudio::Load(const char *szRegistryKey)
dwType = REG_DWORD; dwSize = sizeof(m_binAudioAdapter);
RegQueryValueEx(hKey, "AudioAdapter", NULL, &dwType, (PBYTE)&m_binAudioAdapter, &dwSize);
dwType = REG_DWORD; dwSize = sizeof(m_bLegacyAudioHack);
RegQueryValueEx(hKey, "LegacyAudioHack", NULL, &dwType, (PBYTE)&m_bLegacyAudioHack, &dwSize);
dwType = REG_DWORD; dwSize = sizeof(m_bPCM);
RegQueryValueEx(hKey, "PCM", NULL, &dwType, (PBYTE)&m_bPCM, &dwSize);
@ -105,9 +102,6 @@ void XBAudio::Save(const char *szRegistryKey)
dwType = REG_BINARY; dwSize = sizeof(m_binAudioAdapter);
RegSetValueEx(hKey, "AudioAdapter", 0, dwType, (PBYTE)&m_binAudioAdapter, dwSize);
dwType = REG_DWORD; dwSize = sizeof(m_bLegacyAudioHack);
RegSetValueEx(hKey, "LegacyAudioHack", 0, dwType, (PBYTE)&m_bLegacyAudioHack, dwSize);
dwType = REG_DWORD; dwSize = sizeof(m_bPCM);
RegSetValueEx(hKey, "PCM", 0, dwType, (PBYTE)&m_bPCM, dwSize);

View File

@ -62,12 +62,6 @@ class XBAudio : public Error
void SetAudioAdapter(GUID binAudioAdapter) { m_binAudioAdapter = binAudioAdapter; }
GUID GetAudioAdapter() const { return m_binAudioAdapter; }
// ******************************************************************
// * Audio Hack Toggling
// ******************************************************************
void SetLegacyAudioHack(BOOL bAudioHack) { m_bLegacyAudioHack = bAudioHack; }
BOOL GetLegacyAudioHack() const { return m_bLegacyAudioHack; }
// ******************************************************************
// * PCM Toggling
// ******************************************************************
@ -91,7 +85,6 @@ class XBAudio : public Error
// * Configuration
// ******************************************************************
GUID m_binAudioAdapter;
BOOL m_bLegacyAudioHack;
BOOL m_bPCM;
BOOL m_bXADPCM;
BOOL m_bUnknownCodec;

View File

@ -116,8 +116,6 @@ INT_PTR CALLBACK DlgAudioConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
/*! check appropriate options */
{
SendMessage(GetDlgItem(hWndDlg, IDC_AC_LEGACY_AUDIO_HACK), BM_SETCHECK, (WPARAM)g_XBAudio.GetLegacyAudioHack(), 0);
SendMessage(GetDlgItem(hWndDlg, IDC_AC_PCM), BM_SETCHECK, (WPARAM)g_XBAudio.GetPCM(), 0);
SendMessage(GetDlgItem(hWndDlg, IDC_AC_XADPCM), BM_SETCHECK, (WPARAM)g_XBAudio.GetXADPCM(), 0);
@ -163,13 +161,9 @@ INT_PTR CALLBACK DlgAudioConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
case IDC_AC_ACCEPT:
{
/*! save LegacyAudioHack/PCM/XADPCM/UnknownCodec options */
/*! save PCM/XADPCM/UnknownCodec options */
{
LRESULT lRet = SendMessage(GetDlgItem(hWndDlg, IDC_AC_LEGACY_AUDIO_HACK), BM_GETCHECK, 0, 0);
g_XBAudio.SetLegacyAudioHack(lRet == BST_CHECKED);
lRet = SendMessage(GetDlgItem(hWndDlg, IDC_AC_PCM), BM_GETCHECK, 0, 0);
LRESULT lRet = SendMessage(GetDlgItem(hWndDlg, IDC_AC_PCM), BM_GETCHECK, 0, 0);
g_XBAudio.SetPCM(lRet == BST_CHECKED);

View File

@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by C:\Users\Luke\Desktop\Projects\Cxbx-Reloaded\resource\Cxbx.rc
// Used by C:\Users\marge\Documents\GitHub\Cxbx-Reloaded\resource\Cxbx.rc
//
#define IDI_CXBX 101
#define IDB_SPLASH 102
@ -60,7 +60,6 @@
#define IDC_AC_ACCEPT 1058
#define IDC_AC_CANCEL 1059
#define IDC_AC_AUDIO_ADAPTER 1060
#define IDC_AC_LEGACY_AUDIO_HACK 1061
#define IDC_AC_PCM 1062
#define IDC_AC_XADPCM 1063
#define IDC_AC_UNKNOWN_CODEC 1064
@ -119,7 +118,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 130
#define _APS_NEXT_RESOURCE_VALUE 131
#define _APS_NEXT_COMMAND_VALUE 40097
#define _APS_NEXT_CONTROL_VALUE 1058
#define _APS_NEXT_SYMED_VALUE 104

View File

@ -571,7 +571,6 @@ void PrintCurrentConfigurationLog()
printf("--------------------------- AUDIO CONFIG ---------------------------\n");
printf("Audio Adapter: %s\n", XBAudioConf.GetAudioAdapter().Data1 == 0 ? "Primary Audio Device" : "Secondary Audio Device");
printf("Legacy Audio Hack is %s\n", XBAudioConf.GetLegacyAudioHack() ? "enabled" : "disabled");
printf("PCM is %s\n", XBAudioConf.GetPCM() ? "enabled" : "disabled");
printf("XADPCM is %s\n", XBAudioConf.GetXADPCM() ? "enabled" : "disabled");
printf("Unknown Codec is %s\n", XBAudioConf.GetUnknownCodec() ? "enabled" : "disabled");