Merge pull request #1081 from Margen67/remove_legacy_audio_hack
Remove legacy audio hack
This commit is contained in:
commit
4fcbb49407
Binary file not shown.
BIN
resource/Cxbx.rc
BIN
resource/Cxbx.rc
Binary file not shown.
|
@ -40,7 +40,7 @@
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * func: XBAudio::XBAudio
|
// * 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 };
|
m_binAudioAdapter = { 0 };
|
||||||
}
|
}
|
||||||
|
@ -70,9 +70,6 @@ void XBAudio::Load(const char *szRegistryKey)
|
||||||
dwType = REG_DWORD; dwSize = sizeof(m_binAudioAdapter);
|
dwType = REG_DWORD; dwSize = sizeof(m_binAudioAdapter);
|
||||||
RegQueryValueEx(hKey, "AudioAdapter", NULL, &dwType, (PBYTE)&m_binAudioAdapter, &dwSize);
|
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);
|
dwType = REG_DWORD; dwSize = sizeof(m_bPCM);
|
||||||
RegQueryValueEx(hKey, "PCM", NULL, &dwType, (PBYTE)&m_bPCM, &dwSize);
|
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);
|
dwType = REG_BINARY; dwSize = sizeof(m_binAudioAdapter);
|
||||||
RegSetValueEx(hKey, "AudioAdapter", 0, dwType, (PBYTE)&m_binAudioAdapter, dwSize);
|
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);
|
dwType = REG_DWORD; dwSize = sizeof(m_bPCM);
|
||||||
RegSetValueEx(hKey, "PCM", 0, dwType, (PBYTE)&m_bPCM, dwSize);
|
RegSetValueEx(hKey, "PCM", 0, dwType, (PBYTE)&m_bPCM, dwSize);
|
||||||
|
|
||||||
|
|
|
@ -62,12 +62,6 @@ class XBAudio : public Error
|
||||||
void SetAudioAdapter(GUID binAudioAdapter) { m_binAudioAdapter = binAudioAdapter; }
|
void SetAudioAdapter(GUID binAudioAdapter) { m_binAudioAdapter = binAudioAdapter; }
|
||||||
GUID GetAudioAdapter() const { return m_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
|
// * PCM Toggling
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
@ -91,7 +85,6 @@ class XBAudio : public Error
|
||||||
// * Configuration
|
// * Configuration
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
GUID m_binAudioAdapter;
|
GUID m_binAudioAdapter;
|
||||||
BOOL m_bLegacyAudioHack;
|
|
||||||
BOOL m_bPCM;
|
BOOL m_bPCM;
|
||||||
BOOL m_bXADPCM;
|
BOOL m_bXADPCM;
|
||||||
BOOL m_bUnknownCodec;
|
BOOL m_bUnknownCodec;
|
||||||
|
|
|
@ -116,8 +116,6 @@ INT_PTR CALLBACK DlgAudioConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
|
||||||
|
|
||||||
/*! check appropriate options */
|
/*! 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_PCM), BM_SETCHECK, (WPARAM)g_XBAudio.GetPCM(), 0);
|
||||||
|
|
||||||
SendMessage(GetDlgItem(hWndDlg, IDC_AC_XADPCM), BM_SETCHECK, (WPARAM)g_XBAudio.GetXADPCM(), 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:
|
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);
|
LRESULT lRet = SendMessage(GetDlgItem(hWndDlg, IDC_AC_PCM), BM_GETCHECK, 0, 0);
|
||||||
|
|
||||||
g_XBAudio.SetLegacyAudioHack(lRet == BST_CHECKED);
|
|
||||||
|
|
||||||
lRet = SendMessage(GetDlgItem(hWndDlg, IDC_AC_PCM), BM_GETCHECK, 0, 0);
|
|
||||||
|
|
||||||
g_XBAudio.SetPCM(lRet == BST_CHECKED);
|
g_XBAudio.SetPCM(lRet == BST_CHECKED);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//{{NO_DEPENDENCIES}}
|
//{{NO_DEPENDENCIES}}
|
||||||
// Microsoft Visual C++ generated include file.
|
// 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 IDI_CXBX 101
|
||||||
#define IDB_SPLASH 102
|
#define IDB_SPLASH 102
|
||||||
|
@ -60,7 +60,6 @@
|
||||||
#define IDC_AC_ACCEPT 1058
|
#define IDC_AC_ACCEPT 1058
|
||||||
#define IDC_AC_CANCEL 1059
|
#define IDC_AC_CANCEL 1059
|
||||||
#define IDC_AC_AUDIO_ADAPTER 1060
|
#define IDC_AC_AUDIO_ADAPTER 1060
|
||||||
#define IDC_AC_LEGACY_AUDIO_HACK 1061
|
|
||||||
#define IDC_AC_PCM 1062
|
#define IDC_AC_PCM 1062
|
||||||
#define IDC_AC_XADPCM 1063
|
#define IDC_AC_XADPCM 1063
|
||||||
#define IDC_AC_UNKNOWN_CODEC 1064
|
#define IDC_AC_UNKNOWN_CODEC 1064
|
||||||
|
@ -119,7 +118,7 @@
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#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_COMMAND_VALUE 40097
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1058
|
#define _APS_NEXT_CONTROL_VALUE 1058
|
||||||
#define _APS_NEXT_SYMED_VALUE 104
|
#define _APS_NEXT_SYMED_VALUE 104
|
||||||
|
|
|
@ -571,7 +571,6 @@ void PrintCurrentConfigurationLog()
|
||||||
|
|
||||||
printf("--------------------------- AUDIO CONFIG ---------------------------\n");
|
printf("--------------------------- AUDIO CONFIG ---------------------------\n");
|
||||||
printf("Audio Adapter: %s\n", XBAudioConf.GetAudioAdapter().Data1 == 0 ? "Primary Audio Device" : "Secondary Audio Device");
|
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("PCM is %s\n", XBAudioConf.GetPCM() ? "enabled" : "disabled");
|
||||||
printf("XADPCM is %s\n", XBAudioConf.GetXADPCM() ? "enabled" : "disabled");
|
printf("XADPCM is %s\n", XBAudioConf.GetXADPCM() ? "enabled" : "disabled");
|
||||||
printf("Unknown Codec is %s\n", XBAudioConf.GetUnknownCodec() ? "enabled" : "disabled");
|
printf("Unknown Codec is %s\n", XBAudioConf.GetUnknownCodec() ? "enabled" : "disabled");
|
||||||
|
|
Loading…
Reference in New Issue