Improve client stability by handling exceptions

This commit is contained in:
yuanyuanxiang
2025-07-16 02:37:33 +08:00
parent 89c6e5014f
commit 965bb64864
23 changed files with 178 additions and 43 deletions

View File

@@ -6,6 +6,12 @@
#include "Audio.h"
#include <iostream>
#ifdef _WINDOWS
#define __CreateThread CreateThread
#else
#include "SafeThread.h"
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
@@ -108,7 +114,7 @@ BOOL CAudio::InitializeWaveIn()
MMRESULT mmResult;
DWORD dwThreadID = 0;
m_hThreadCallBack = m_Thread = CreateThread(NULL, 0,
m_hThreadCallBack = m_Thread = __CreateThread(NULL, 0,
waveInCallBack, (LPVOID)this,
CREATE_SUSPENDED, &dwThreadID);