音频相关的1处缺陷修复
1、TestRun读取配置文件改为setting.ini,配置项为 [settings] localIp 和 ghost。 2、CAudio的线程waveInCallBack在while循环有一处return,已改为break.
This commit is contained in:
@@ -189,3 +189,7 @@ ghost项目采用VS2012 xp模式编译,以便支持在XP系统上运行。
|
|||||||
2019.4.15
|
2019.4.15
|
||||||
|
|
||||||
明确区分开退出被控端和退出主控端2个消息,只有发送退出被控端消息才会停止Socket客户端。
|
明确区分开退出被控端和退出主控端2个消息,只有发送退出被控端消息才会停止Socket客户端。
|
||||||
|
|
||||||
|
2019.4.19
|
||||||
|
1、TestRun读取配置文件改为setting.ini,配置项为 [settings] localIp 和 ghost。
|
||||||
|
2、CAudio的线程waveInCallBack在while循环有一处return,已改为break.
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ DWORD WINAPI CAudio::waveInCallBack(LPVOID lParam)
|
|||||||
MMRESULT mmResult = waveInAddBuffer(This->m_hWaveIn,
|
MMRESULT mmResult = waveInAddBuffer(This->m_hWaveIn,
|
||||||
This->m_InAudioHeader[This->m_nWaveInIndex], sizeof(WAVEHDR));
|
This->m_InAudioHeader[This->m_nWaveInIndex], sizeof(WAVEHDR));
|
||||||
if (mmResult != MMSYSERR_NOERROR)
|
if (mmResult != MMSYSERR_NOERROR)
|
||||||
return -1;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Msg.message == MM_WIM_CLOSE)
|
if (Msg.message == MM_WIM_CLOSE)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ int main(int argc, const char *argv[])
|
|||||||
{
|
{
|
||||||
if(!SetSelfStart(argv[0], "a_ghost"))
|
if(!SetSelfStart(argv[0], "a_ghost"))
|
||||||
{
|
{
|
||||||
std::cout<<"<EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>.\n";
|
std::cout<<"<EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD><EFBFBD><EFBFBD>ԱȨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.\n";
|
||||||
}
|
}
|
||||||
status = 0;
|
status = 0;
|
||||||
SetConsoleCtrlHandler(&callback, TRUE);
|
SetConsoleCtrlHandler(&callback, TRUE);
|
||||||
@@ -92,11 +92,11 @@ int main(int argc, const char *argv[])
|
|||||||
int &port = g_ConnectAddress.iPort;
|
int &port = g_ConnectAddress.iPort;
|
||||||
if (0 == strlen(ip))
|
if (0 == strlen(ip))
|
||||||
{
|
{
|
||||||
strcpy(p+1, "remote.ini");
|
strcpy(p+1, "settings.ini");
|
||||||
GetPrivateProfileStringA("remote", "ip", "127.0.0.1", ip, _MAX_PATH, path);
|
GetPrivateProfileStringA("settings", "localIp", "127.0.0.1", ip, _MAX_PATH, path);
|
||||||
port = GetPrivateProfileIntA("remote", "port", 2356, path);
|
port = GetPrivateProfileIntA("settings", "ghost", 2356, path);
|
||||||
}
|
}
|
||||||
printf("[remote] %s:%d\n", ip, port);
|
printf("[server] %s:%d\n", ip, port);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
run(ip, port);
|
run(ip, port);
|
||||||
|
|||||||
Reference in New Issue
Block a user