Disable Legacy Audio Hack Option

Currently legacy audio hack option is not implemented, so it's disabled
before merge into master repo. Plus force all unimplemented functions to
output once, not repeatly.
This commit is contained in:
RadWolfie 2017-07-22 21:16:17 -05:00
parent 3da46a9a15
commit 85ff52e502
2 changed files with 9 additions and 4 deletions

View File

@ -273,7 +273,7 @@ COMBOBOX IDC_AC_AUDIO_ADAPTER, 76, 12, 173, 100, CBS_DROPDOWNLIST | WS_VS
CONTROL "Enable PCM", IDC_AC_PCM, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 76, 46, 65, 10
CONTROL "Enable XADPCM", IDC_AC_XADPCM, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 76, 59, 123, 11
CONTROL "Enable Unknown Codec", IDC_AC_UNKNOWN_CODEC, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 76, 72, 98, 10
CONTROL "Use Legacy Audio Hack", IDC_AC_LEGACY_AUDIO_HACK, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 76, 33, 98, 10
CONTROL "Use Legacy Audio Hack", IDC_AC_LEGACY_AUDIO_HACK, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 76, 33, 98, 10
PUSHBUTTON "Cancel", IDC_AC_CANCEL, 146, 102, 50, 14, BS_FLAT
PUSHBUTTON "Accept", IDC_AC_ACCEPT, 206, 102, 50, 14, BS_FLAT
GROUPBOX "DirectSound Configuration", IDC_STATIC, 4, 1, 250, 98, BS_CENTER

View File

@ -40,9 +40,11 @@
// LOG_UNIMPLEMENTED indicates that Cxbx is missing an implementation from DSound api
#define LOG_UNIMPLEMENTED_DSOUND() \
do { if(g_bPrintfOn) { \
std::cout << __func__ << " unimplemented!\n"; \
} } while (0)
static bool b_echoOnce = true; \
if (g_bPrintfOn && b_echoOnce) { \
std::cout << __func__ << " unimplemented!\n"; \
b_echoOnce = false; \
}
CRITICAL_SECTION g_DSoundCriticalSection;
#define enterCriticalSection EnterCriticalSection(&g_DSoundCriticalSection)
@ -1210,6 +1212,9 @@ inline HRESULT HybridDirectSoundBuffer_SetVolume(
}
if (lVolume > -10000 && lVolume <= -6400) {
lVolume = -10000;
} else if (lVolume > 0) {
EmuWarning("HybridDirectSoundBuffer_SetVolume has received greater than 0: %d", lVolume);
lVolume = 0;
}
HRESULT hRet = pDSBuffer->SetVolume(lVolume);