Улучшен алгоритм распознавания ошибок (добавлена полоса частот)

This commit is contained in:
cfif 2025-05-26 12:41:59 +03:00
parent 746149ebdb
commit 7c6534023b
9 changed files with 14 additions and 6 deletions

View File

@ -24,10 +24,17 @@ typedef struct {
wchar_t captionWindow[_MAX_PATH];
wchar_t pathWav1[_MAX_PATH];
wchar_t pathWav2[_MAX_PATH];
wchar_t f1[_MAX_PATH];
wchar_t f2[_MAX_PATH];
BOOL error;
int number;
BOOL isFindResult;
wchar_t textResult[_MAX_PATH];
} tCompareStruct;
@ -117,7 +124,7 @@ static BOOL CALLBACK enum_wnd_proc(HWND hwnd, LPARAM lParam) {
#ifdef DEBUG_PRINTF
printf("Edit3 found!\n");
#endif
compareStruct->error = setTextHwnd(hwnd, L"3000", 50);
compareStruct->error = setTextHwnd(hwnd, compareStruct->f1, 50);
if (compareStruct->error) {
printf("Error: Edit1\n");
@ -132,7 +139,7 @@ static BOOL CALLBACK enum_wnd_proc(HWND hwnd, LPARAM lParam) {
#ifdef DEBUG_PRINTF
printf("Edit4 found!\n");
#endif
compareStruct->error = setTextHwnd(hwnd, L"6000", 50);
compareStruct->error = setTextHwnd(hwnd, compareStruct->f2, 50);
if (compareStruct->error) {
printf("Error: Edit1\n");
@ -259,13 +266,15 @@ int wmain(int argc, wchar_t* argv[], wchar_t* envp[]) {
UINT timerUpdate = 0;
if (argc != 3) {
if (argc != 5) {
printf("Error: Invalid parameters\n");
return 1;
}
wcscpy_s(compareStruct.pathWav1, _MAX_PATH, argv[1]);
wcscpy_s(compareStruct.pathWav2, _MAX_PATH, argv[2]);
wcscpy_s(compareStruct.f1, _MAX_PATH, argv[3]);
wcscpy_s(compareStruct.f2, _MAX_PATH, argv[4]);
HWND hwnd = FindWindowW(NULL, captionWindow);

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,6 @@
 Compare.c
Создание кода
Создание кода завершено
0 of 8 functions ( 0.0%) were compiled, the rest were copied from previous compilation.
0 functions were new in current compilation
0 functions had inline decision re-evaluated but remain unchanged
Previous IPDB and IOBJ mismatch, fall back to full compilation.
All 8 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Compare.vcxproj -> C:\VC\Compare\Release\Compare.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.