ReactOS  0.4.14-dev-49-gfb4591c
sndrec32.cpp
Go to the documentation of this file.
1 /* PROJECT: ReactOS sndrec32
2  * LICENSE: GPL - See COPYING in the top level directory
3  * FILE: base/applications/sndrec32/sndrec32.cpp
4  * PURPOSE: Sound recording
5  * PROGRAMMERS: Marco Pagliaricci (irc: rendar)
6  * Robert Naumann (gonzoMD)
7  */
8 
9 #include "stdafx.h"
10 
11 #include <commctrl.h>
12 #include <commdlg.h>
13 #include <winnls.h>
14 
15 #include "sndrec32.h"
16 #include "shellapi.h"
17 
18 #ifndef _UNICODE
19 #define gprintf _snprintf
20 #else
21 #define gprintf _snwprintf
22 #endif
23 
27 
34 
36 
44 
49 
53 
55 
63 
66 
68 
69 snd::audio_membuffer *AUD_BUF;
70 snd::audio_waveout *AUD_OUT;
71 snd::audio_wavein *AUD_IN;
72 
74 
75 NONCLIENTMETRICS s_info;
76 
80 
81 INT_PTR
84  UINT msg,
85  WPARAM wp,
86  LPARAM lp)
87 {
88  switch (msg)
89  {
90  case WM_COMMAND:
91  switch (LOWORD(wp))
92  {
93  case IDOK:
94  EndDialog(hWnd, 0);
95  return TRUE;
96  }
97  break;
98  case WM_CLOSE:
99  EndDialog(hWnd, 0);
100  return TRUE;
101  }
102  return FALSE;
103 }
104 
105 int
106 APIENTRY
108  HINSTANCE hPrevInstance,
109  LPTSTR lpCmdLine,
110  int nCmdShow)
111 {
112  UNREFERENCED_PARAMETER(hPrevInstance);
113  UNREFERENCED_PARAMETER(lpCmdLine);
114 
115  MSG msg;
116  HACCEL hAccelTable;
117 
118  s_info.cbSize = sizeof( NONCLIENTMETRICS );
119 
121 
122  switch (GetUserDefaultUILanguage())
123  {
126  break;
127 
128  default:
129  break;
130  }
131 
133 
138 
143 
144  /* Retrieving default system font, and others system informations */
145  SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
146  sizeof(NONCLIENTMETRICS),
147  &s_info,
148  0);
149 
150  /* Set font size */
151  s_info.lfMenuFont.lfHeight = 14;
152 
153  /* Inits buttons bitmaps */
154 
160 
166 
167  /* Inits audio devices and buffers */
168 
169  snd::audio_membuffer AUD_buffer(snd::A44100_16BIT_STEREO);
170  snd::audio_waveout AUD_waveout(snd::A44100_16BIT_STEREO, AUD_buffer);
171  snd::audio_wavein AUD_wavein(snd::A44100_16BIT_STEREO, AUD_buffer);
172 
173  AUD_buffer.play_finished = l_play_finished;
174  AUD_buffer.audio_arrival = l_audio_arrival;
175  AUD_buffer.buffer_resized = l_buffer_resized;
176 
177  AUD_buffer.alloc_seconds(INITIAL_BUFREC_SECONDS);
178 
179  AUD_IN = &AUD_wavein;
180  AUD_OUT = &AUD_waveout;
181  AUD_BUF = &AUD_buffer;
182 
183  /* Inits slider default parameters */
184 
185  slider_pos = 0;
186  slider_min = 0;
188 
190  path_set = FALSE;
191  isnew = TRUE;
192  display_dur = TRUE;
193 
194  samples_max = AUD_buffer.total_samples();
195 
196  s_recording = false;
197 
198  /* Inits strings */
208 
209  /* Registers sndrec32 window class */
212 
213  if (!InitInstance(hInstance, nCmdShow))
214  {
215  MessageBox(0, TEXT("CreateWindow() Error!"), TEXT("ERROR"), MB_ICONERROR);
216  return FALSE;
217  }
218 
219  /* Loads key accelerators */
221 
222  /* Starts main loop */
223  while (GetMessage(&msg, NULL, 0, 0))
224  {
225  if (!TranslateAccelerator(main_win, hAccelTable, &msg))
226  {
229  }
230  }
231 
232  if (wout_first)
233  {
234  AUD_waveout.close();
235  }
236 
237  if (win_first)
238  {
239  AUD_wavein.close();
240  }
241 
242  AUD_buffer.clear();
243 
244  return (int)msg.wParam;
245 }
246 
247 ATOM
249 {
250  WNDCLASSEX wcex;
251 
252  wcex.cbSize = sizeof(WNDCLASSEX);
253 
254  wcex.style = CS_HREDRAW | CS_VREDRAW;
255  wcex.lpfnWndProc = WndProc;
256  wcex.cbClsExtra = 0;
257  wcex.cbWndExtra = 0;
258  wcex.hInstance = hInstance;
260  wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
265 
266  return RegisterClassEx(&wcex);
267 }
268 
269 BOOL
271 {
272  HWND hWnd;
273 
274  hInst = hInstance;
275 
277  szTitle,
281  MAINWINDOW_W,
282  MAINWINDOW_H,
283  NULL,
284  NULL,
285  hInstance,
286  NULL);
287  if (!hWnd)
288  {
289  return FALSE;
290  }
291 
292  ShowWindow(hWnd, nCmdShow);
294 
295  main_win = hWnd;
296 
297  return TRUE;
298 }
299 
300 ATOM
302 {
303  WNDCLASSEX wcex;
304 
305  wcex.cbSize = sizeof(WNDCLASSEX);
306 
307  wcex.style = CS_HREDRAW | CS_VREDRAW;
308  wcex.lpfnWndProc = WndProc_wave;
309  wcex.cbClsExtra = 0;
310  wcex.cbWndExtra = 0;
311  wcex.hInstance = hInstance;
312  wcex.hIcon = 0;
313  wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
314  wcex.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
315  wcex.lpszMenuName = 0;
316  wcex.lpszClassName = TEXT("sndrec32_wave");
317  wcex.hIconSm = 0;
318 
319  return RegisterClassEx(&wcex);
320 }
321 
322 BOOL
325  int nCmdShow)
326 {
327  HWND hWnd;
328 
329  hInst = hInstance;
330 
332  TEXT("sndrec32_wave"),
333  TEXT(""),
335  WAVEBAR_X,
336  WAVEBAR_Y,
337  WAVEBAR_CX,
338  WAVEBAR_CY,
339  f,
340  (HMENU)8,
341  hInstance,
342  0);
343 
344  if (!hWnd )
345  {
346  return FALSE;
347  }
348 
349  ShowWindow(hWnd, nCmdShow);
351 
352  wave_win = hWnd;
353 
354  return TRUE;
355 }
356 
357 LRESULT
358 CALLBACK
360  UINT message,
361  WPARAM wParam,
362  LPARAM lParam)
363 {
364  PAINTSTRUCT ps;
365  HDC hdc;
366  HPEN pen;
367  HPEN oldpen;
368 
369  unsigned int max_h = (cli.bottom / 2);
370  unsigned int samples;
371  unsigned int x, line_h;
372 
373  switch (message)
374  {
375  case WM_CREATE:
377  break;
378 
379  case WM_PAINT:
380  /* Initialize hdc objects */
381  hdc = BeginPaint(hWnd, &ps);
382  pen = (HPEN)CreatePen(PS_SOLID, 1, WAVEBAR_COLOR);
383  oldpen = (HPEN) SelectObject(hdc, (HBRUSH)pen);
384  if (AUD_OUT->current_status() == snd::WAVEOUT_PLAYING)
385  {
386  samples = AUD_OUT->tot_samples_buf();
387  for (unsigned int i = 0; i < WAVEBAR_CX; ++i)
388  {
389  x = (i * samples) / WAVEBAR_CX;
390  line_h = (AUD_OUT->nsample(x) * max_h) / AUD_OUT->samplevalue_max();
391  if (line_h)
392  {
393  MoveToEx(hdc, i, max_h, 0);
394  LineTo(hdc, i, max_h - (line_h * 2));
395  LineTo(hdc, i, max_h + (line_h * 2));
396  }
397  else
398  {
399  SetPixel(hdc, i, max_h, WAVEBAR_COLOR);
400  }
401  }
402  }
403  else if (AUD_IN->current_status() == snd::WAVEIN_RECORDING)
404  {
405  samples = AUD_IN->tot_samples_buf();
406  for (unsigned int i = 0; i < WAVEBAR_CX; ++i)
407  {
408  x = (i * samples) / WAVEBAR_CX;
409  line_h = (AUD_IN->nsample(x) * max_h) / AUD_IN->samplevalue_max();
410  if (line_h)
411  {
412  MoveToEx(hdc, i, max_h, 0);
413  LineTo(hdc, i, max_h - (line_h * 2));
414  LineTo(hdc, i, max_h + (line_h * 2));
415  }
416  else
417  {
418  SetPixel( hdc, i, max_h, WAVEBAR_COLOR );
419  }
420  }
421  }
422  else
423  {
424  /* In standby mode draw a simple line */
425  MoveToEx(hdc, 0, cli.bottom / 2, 0);
426  LineTo(hdc, WAVEBAR_CX, cli.bottom / 2);
427  }
428 
429  SelectObject(hdc, oldpen);
430  DeleteObject( pen );
431  EndPaint( hWnd, &ps );
432  break;
433 
434  case WM_USER:
435  break;
436 
437  default:
439  }
440 
441  return 0;
442 }
443 
444 LRESULT
445 CALLBACK
447  UINT message,
448  WPARAM wParam,
449  LPARAM lParam)
450 {
451  int wmId;
452  TCHAR str_tmp[MAX_LOADSTRING];
453  PAINTSTRUCT ps;
454  HDC hdc;
455  HFONT font;
456  HFONT oldfont;
457  long long slid_samp = 0;
458 
459  /* Checking for global pointers to buffer and io audio devices */
460  if ((!AUD_IN) || (!AUD_OUT) || (!AUD_BUF))
461  {
462  MessageBox(0, TEXT("Buffer Error"), 0, 0);
463  return 1;
464  }
465 
466  switch (message)
467  {
468  case WM_CREATE:
469  /* Creating the wave bar */
471  {
472  MessageBox(0, TEXT("CreateWindow() Error!"), TEXT("ERROR"), MB_ICONERROR);
473  return FALSE;
474  }
475 
476  /* Creating ALL the buttons */
477  for (int i = 0; i < 5; ++i)
478  {
479  buttons[i] = CreateWindow(TEXT("button"),
480  TEXT(""),
482  BUTTONS_CX + (i * (BUTTONS_W + ((i == 0) ? 0 : BUTTONS_SPACE))),
483  BUTTONS_CY,
484  BUTTONS_W,
485  BUTTONS_H,
486  hWnd,
487  (HMENU)UlongToPtr(i),
488  hInst,
489  0);
490  if (!buttons[i])
491  {
492  MessageBox(0, 0, TEXT("CreateWindow() Error!"), 0);
493  return FALSE;
494  }
495 
496  /* Realize the button bmp image */
499  disable_but(i);
500  }
501 
502  /* Creating the SLIDER window */
504  TEXT(""),
506  SLIDER_CX,
507  SLIDER_CY,
508  SLIDER_W,
509  SLIDER_H,
510  hWnd,
511  (HMENU)SLIDER_ID,
512  hInst,
513  0);
514  if (!slider)
515  {
516  MessageBox(0, 0, TEXT( "CreateWindow() Error!" ), 0);
517  return FALSE;
518  }
519 
520  /* Sets slider limits */
522  TBM_SETRANGE,
523  (WPARAM)TRUE,
525 
529  break;
530 
531  /* Implements slider logic */
532  case WM_HSCROLL:
533  {
534  switch (LOWORD(wParam))
535  {
536  case SB_ENDSCROLL:
537  break;
538  case SB_PAGERIGHT:
539  case SB_PAGELEFT:
540  case TB_THUMBTRACK:
541  /* If the user touch the slider bar, set the
542  audio start position properly */
544  slid_samp = (__int64)slider_pos * (__int64)samples_max;
545  AUD_BUF->set_position(AUD_BUF->audinfo().bytes_in_samples((unsigned int)(slid_samp / (__int64)slider_max)));
547  break;
548  }
549  break;
550  }
551 
552  case WM_COMMAND:
553  wmId = LOWORD(wParam);
554  if ((wmId >= 0) && (wmId < 5) && (butdisabled[wmId] != FALSE))
555  break;
556 
557  switch (wmId)
558  {
559  case ID_FILE_NEW:
560  if (!isnew)
561  {
562  if (AUD_IN->current_status() == snd::WAVEIN_RECORDING)
563  AUD_IN->stop_recording();
564 
565  if ((AUD_OUT->current_status() == snd::WAVEOUT_PLAYING) ||
566  (AUD_OUT->current_status() == snd::WAVEOUT_PAUSED))
567  AUD_OUT->stop();
568 
569  AUD_BUF->reset();
570 
576 
577  samples_max = AUD_BUF->total_samples();
578  slider_pos = 0;
579 
581 
584 
585  isnew = TRUE;
586  display_dur = TRUE;
587 
588  ZeroMemory(file_path, MAX_PATH * sizeof(TCHAR));
589 
591 
594  }
595  break;
596 
597  case ID_FILE_OPEN:
598  ZeroMemory(&ofn, sizeof(ofn));
599 
600  ofn.lStructSize = sizeof(ofn);
601  ofn.hwndOwner = hWnd;
602  ofn.lpstrFilter = TEXT("Audio Files (*.wav)\0*.wav\0All Files (*.*)\0*.*\0");
606  ofn.lpstrDefExt = TEXT("wav");
607 
608  if (GetOpenFileName(&ofn))
609  {
613 
615  }
616 
619  break;
620 
621  case ID_ABOUT:
623  return TRUE;
624  break;
625 
626  case ID_FILE_SAVEAS:
627  ZeroMemory(&ofn, sizeof(ofn));
628 
629  ofn.lStructSize = sizeof(ofn);
630  ofn.hwndOwner = hWnd ;
632  ofn.lpstrFilter = TEXT("Audio Files (*.wav)\0*.wav\0All Files (*.*)\0*.*\0");
635 
636  ofn.lpstrDefExt = TEXT("wav");
637 
638  if (GetSaveFileName (&ofn))
639  {
642  }
643  break;
644 
645 
646  case ID_EDIT_AUDIOPROPS:
647  ShellExecute(NULL, NULL, _T("rundll32.exe"), _T("shell32.dll,Control_RunDLL mmsys.cpl,ShowAudioPropertySheet"), NULL, SW_SHOWNORMAL);
648  break;
649 
650  case ID_FILE_EXIT:
652  break;
653 
654  /* Sndrec32 buttons routines */
655  case BUTSTART_ID:
656  AUD_BUF->set_position_start();
657  slider_pos = 0;
659  break;
660 
661  case BUTEND_ID:
663  break;
664 
665  case BUTPLAY_ID:
666  if (wout_first == false)
667  {
668  AUD_OUT->open();
669  wout_first = true;
670  }
671 
672  AUD_OUT->play();
673 
678 
679  SetTimer(hWnd, 1, 250, 0);
681 
682  break;
683 
684  case BUTSTOP_ID:
685  if (s_recording)
686  {
687  s_recording = FALSE;
688 
689  AUD_IN->stop_recording();
690 
691  /* Resetting slider position */
692  slider_pos = 0;
694 
695  samples_max = AUD_BUF->samples_received();
696 
698 
703 
706 
707  display_dur = FALSE;
708 
709  AUD_BUF->truncate();
710 
713 
714  }
715  else
716  {
717  AUD_OUT->pause();
718 
723 
724  }
725 
726  KillTimer(hWnd, 1);
728 
730 
731  break;
732 
733  case BUTREC_ID:
734  if (win_first == false)
735  {
736  AUD_IN->open();
737  win_first = true;
738  }
739 
740  s_recording = TRUE;
741 
742  samples_max = AUD_BUF->total_samples();
743 
744  AUD_IN->start_recording();
745 
747 
752 
753  isnew = FALSE;
754 
756 
757  SetTimer(hWnd, 1, 150, 0);
759 
760  break;
761 
762  default:
764  }
765  break;
766 
767  case WM_TIMER:
768  switch (wParam)
769  {
770  case 1:
771  if (stopped_flag)
772  {
773  KillTimer(hWnd, 1);
775  slider_pos = 0;
778  }
779 
782  break;
783 
784  case WAVEBAR_TIMERID:
786  SendMessage(wave_win, WM_USER, 0, 0);
787  break;
788  }
789  break;
790 
791  case WM_PAINT:
792  hdc = BeginPaint(hWnd, &ps);
793  font = CreateFontIndirect(&s_info.lfMenuFont);
794  oldfont = (HFONT) SelectObject(hdc, font);
796 
797  if (AUD_IN->current_status() == snd::WAVEIN_RECORDING)
798  {
799  gprintf(str_tmp,
801  str_pos,
802  (float)((float)AUD_BUF->bytes_recorded() / (float)AUD_BUF->audinfo().byte_rate()));
803 
804  }
805  else if (AUD_OUT->current_status() == snd::WAVEOUT_PLAYING)
806  {
807  gprintf(str_tmp,
809  str_pos,
810  (float)((float)AUD_BUF->bytes_played() / (float)AUD_BUF->audinfo().byte_rate()));
811  }
812  else
813  {
814  gprintf(str_tmp,
816  str_pos,
817  (float)((((float)slider_pos * (float)samples_max) / (float)slider_max) / (float)AUD_BUF->audinfo().sample_rate()));
818  }
819 
820  ExtTextOut(hdc,
821  STRPOS_X,
822  STRPOS_Y,
823  ETO_OPAQUE,
824  0,
825  str_tmp,
826  _tcslen(str_tmp),
827  0);
828 
829  if (display_dur)
830  {
831  gprintf(str_tmp,
833  str_dur,
834  AUD_BUF->fseconds_total());
835  }
836  else
837  {
838  gprintf(str_tmp,
840  str_dur,
841  AUD_BUF->fseconds_recorded());
842  }
843 
844  ExtTextOut(hdc,
845  STRDUR_X,
846  STRDUR_Y,
847  ETO_OPAQUE,
848  0,
849  str_tmp,
850  _tcslen(str_tmp),
851  0);
852 
853  gprintf(str_tmp,
855  str_buf,
856  (float)((float)AUD_BUF->mem_size() / 1024.0f));
857 
858  ExtTextOut(hdc,
859  STRBUF_X,
860  STRBUF_Y,
861  ETO_OPAQUE,
862  0,
863  str_tmp,
864  _tcslen(str_tmp),
865  0);
866 
867  gprintf(str_tmp,
869  str_fmt,
870  (float)((float)AUD_BUF->audinfo().sample_rate() / 1000.0f),
871  AUD_BUF->audinfo().bits(),
872  AUD_BUF->audinfo().channels() == 2 ? str_mono : str_stereo);
873 
874  ExtTextOut(hdc,
875  STRFMT_X,
876  STRFMT_Y,
877  ETO_OPAQUE,
878  0,
879  str_tmp,
880  _tcslen(str_tmp),
881  0);
882 
883  gprintf(str_tmp,
885  str_chan,
886  AUD_BUF->audinfo().channels() == 2 ? str_stereo : str_mono);
887 
888  ExtTextOut(hdc,
889  STRCHAN_X,
890  STRCHAN_Y,
891  ETO_OPAQUE,
892  0,
893  str_tmp,
894  _tcslen(str_tmp),
895  0);
896 
897  SelectObject(hdc, oldfont);
899  EndPaint(hWnd, &ps);
900  break;
901 
902  case WM_DESTROY:
903  PostQuitMessage(0);
904  break;
905  default:
907  }
908 
909  return 0;
910 }
911 
912 void l_play_finished(void)
913 {
914  stopped_flag = true;
915 
920 
922 }
923 
924 void l_audio_arrival(unsigned int samples_arrival)
925 {
926  slider_pos += (DWORD)((slider_max * samples_arrival) / samples_max);
927 }
928 
929 void l_buffer_resized(unsigned int new_size)
930 {
931 }
932 
934 {
935  butdisabled[id] = FALSE;
937 }
938 
940 {
941  butdisabled[id] = TRUE;
943 }
944 
946 {
947  HANDLE file;
948 
949  riff_hdr r;
950  wave_hdr w;
951  data_chunk d;
952 
953  BOOL b;
954 
955  DWORD bytes_recorded_in_wav = 0;
956  DWORD is_read = 0;
957 
958  file = CreateFile(f,
959  GENERIC_READ,
960  0,
961  0,
964  0);
965  if (!file)
966  {
968  TEXT("Cannot open file. CreateFile() error."),
969  TEXT("ERROR"),
970  MB_OK | MB_ICONERROR);
971 
972  return FALSE;
973  }
974 
975  b = ReadFile(file, (LPVOID)&r, sizeof(r), &is_read, 0);
976  if (!b)
977  {
979  TEXT("Cannot read RIFF header."),
980  TEXT("ERROR"),
981  MB_OK | MB_ICONERROR);
982 
983  CloseHandle(file);
984  return FALSE;
985  }
986 
987  b = ReadFile(file, (LPVOID)&w, sizeof(w), &is_read, 0);
988  if (!b)
989  {
991  TEXT("Cannot read WAVE header."),
992  TEXT("ERROR"),
993  MB_OK | MB_ICONERROR);
994 
995  CloseHandle(file);
996  return FALSE;
997  }
998 
999  b = ReadFile(file, (LPVOID)&d, sizeof(d), &is_read, 0);
1000  if (!b)
1001  {
1003  TEXT("Cannot read WAVE subchunk."),
1004  TEXT("ERROR"),
1005  MB_OK | MB_ICONERROR);
1006 
1007  CloseHandle(file);
1008  return FALSE;
1009  }
1010 
1011  bytes_recorded_in_wav = r.chunksize - 36;
1012  if (bytes_recorded_in_wav == 0)
1013  {
1015  TEXT("Cannot read file. No audio data."),
1016  TEXT("ERROR"),
1017  MB_OK | MB_ICONERROR);
1018 
1019  CloseHandle(file);
1020  return FALSE;
1021  }
1022 
1023  snd::audio_format openfmt(w.SampleRate, w.BitsPerSample, w.NumChannels);
1024 
1025  AUD_BUF->clear();
1026  AUD_BUF->alloc_bytes(bytes_recorded_in_wav);
1027 
1028  b = ReadFile(file,
1029  (LPVOID)AUD_BUF->audio_buffer(),
1030  bytes_recorded_in_wav,
1031  &is_read,
1032  0);
1033 
1034  AUD_BUF->set_b_received(bytes_recorded_in_wav);
1035 
1036  if ((!b) || (is_read != bytes_recorded_in_wav))
1037  {
1039  TEXT("Cannot read file. Error reading audio data."),
1040  TEXT("ERROR"),
1041  MB_OK | MB_ICONERROR);
1042 
1043  CloseHandle(file);
1044 
1045  AUD_BUF->reset();
1046  return FALSE;
1047  }
1048 
1049  CloseHandle(file);
1050 
1056 
1057  samples_max = AUD_BUF->samples_received();
1058 
1059  isnew = FALSE;
1060 
1061  return TRUE;
1062 }
1063 
1064 BOOL
1066 {
1067  HANDLE file;
1068  DWORD written;
1069  BOOL is_writ;
1070  int i;
1071  riff_hdr r;
1072  wave_hdr w;
1073  data_chunk d;
1074 
1076  if (!file)
1077  {
1078  i = MessageBox(main_win,
1079  TEXT("File already exist. Overwrite it?"),
1080  TEXT("Warning"),
1082 
1083  if (i == IDYES)
1084  {
1086  if (!file)
1087  {
1089  TEXT("File Error, CreateFile() failed."),
1090  TEXT("ERROR"),
1091  MB_OK | MB_ICONERROR);
1092 
1093  return FALSE;
1094  }
1095 
1096  } else
1097  return FALSE;
1098  }
1099 
1100  r.magic = 0x46464952;
1101  r.format = 0x45564157;
1102  r.chunksize = 36 + AUD_BUF->bytes_recorded();
1103 
1104  w.Subchunkid = 0x20746d66;
1105  w.Subchunk1Size = 16;
1106  w.AudioFormat = 1;
1107  w.NumChannels = AUD_BUF->audinfo().channels();
1108  w.SampleRate = AUD_BUF->audinfo().sample_rate();
1109  w.ByteRate = AUD_BUF->audinfo().byte_rate();
1110  w.BlockAlign = AUD_BUF->audinfo().block_align();
1111  w.BitsPerSample = AUD_BUF->audinfo().bits();
1112 
1113  d.subc = 0x61746164;
1114  d.subc_size = AUD_BUF->bytes_recorded();
1115 
1116  /* Writing headers */
1117  is_writ = WriteFile(file, (LPCVOID)&r, sizeof(r), &written, 0);
1118  if (!is_writ)
1119  {
1121  TEXT("File Error, WriteFile() failed."),
1122  TEXT("ERROR"),
1123  MB_OK | MB_ICONERROR);
1124 
1125  CloseHandle(file);
1126  return FALSE;
1127  }
1128 
1129  is_writ = WriteFile(file, (LPCVOID)&w, sizeof(w), &written, 0);
1130  if (!is_writ)
1131  {
1133  TEXT("File Error, WriteFile() failed."),
1134  TEXT("ERROR"),
1135  MB_OK | MB_ICONERROR);
1136 
1137  CloseHandle(file);
1138  return FALSE;
1139  }
1140 
1141  is_writ = WriteFile(file, (LPCVOID)&d, sizeof(d), &written, 0);
1142  if (!is_writ)
1143  {
1145  TEXT("File Error, WriteFile() failed."),
1146  TEXT("ERROR"),
1147  MB_OK | MB_ICONERROR);
1148 
1149  CloseHandle(file);
1150  return FALSE;
1151  }
1152 
1153  is_writ = WriteFile(file,
1154  (LPCVOID)AUD_BUF->audio_buffer(),
1155  AUD_BUF->bytes_recorded(),
1156  &written,
1157  0);
1158  if (!is_writ)
1159  {
1161  TEXT("File Error, WriteFile() failed."),
1162  TEXT("ERROR"),
1163  MB_OK | MB_ICONERROR);
1164 
1165  CloseHandle(file);
1166  return FALSE;
1167  }
1168 
1169  CloseHandle(file);
1170  return TRUE;
1171 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define IDS_STRBUF
Definition: resource.h:34
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
BOOL wout_first
Definition: sndrec32.cpp:35
#define OFN_EXPLORER
Definition: commdlg.h:104
#define TB_THUMBTRACK
Definition: commctrl.h:2050
void l_play_finished(void)
Definition: sndrec32.cpp:912
BOOL open_wav(TCHAR *f)
Definition: sndrec32.cpp:945
#define TranslateAccelerator
Definition: winuser.h:5761
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
GLsizei samples
Definition: glext.h:7006
UINT style
Definition: winuser.h:3176
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDB_BITMAP2_PLAY_DIS
Definition: resource.h:28
#define DispatchMessage
Definition: winuser.h:5666
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:806
BOOL WINAPI TranslateMessage(_In_ const MSG *)
Definition: tftpd.h:59
DWORD samples_max
Definition: sndrec32.cpp:54
HBITMAP butbmps_dis[5]
Definition: sndrec32.cpp:42
LPCSTR lpszMenuName
Definition: winuser.h:3184
#define TRUE
Definition: types.h:120
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define IDOK
Definition: winuser.h:824
TCHAR str_stereo[10]
Definition: sndrec32.cpp:65
#define CloseHandle
Definition: compat.h:398
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
#define REFRESHA_Y
Definition: sndrec32.h:67
#define RegisterClassEx
Definition: winuser.h:5738
#define STRCHAN_X
Definition: sndrec32.h:53
LRESULT CALLBACK WndProc_wave(HWND, UINT, WPARAM, LPARAM)
Definition: sndrec32.cpp:359
#define LAYOUT_RTL
Definition: wingdi.h:1370
#define TBS_ENABLESELRANGE
Definition: commctrl.h:1996
HCURSOR hCursor
Definition: winuser.h:3182
WNDPROC lpfnWndProc
Definition: winuser.h:3177
#define CreateWindow
Definition: winuser.h:5655
#define IDYES
Definition: winuser.h:829
INT_PTR CALLBACK AboutDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
Definition: sndrec32.cpp:83
TCHAR szTitle[MAX_LOADSTRING]
Definition: sndrec32.cpp:25
HWND hwndOwner
Definition: commdlg.h:330
LPCSTR lpszClassName
Definition: winuser.h:3185
audio_format A44100_16BIT_STEREO(44100, 16, 2)
WORD ATOM
Definition: dimm.idl:113
Definition: mk_font.cpp:20
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define IDB_BITMAP2_STOP
Definition: resource.h:22
#define MAX_LOADSTRING
Definition: fontview.h:3
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define WAVEBAR_COLOR
Definition: sndrec32.h:64
#define IDB_BITMAP2_END_DIS
Definition: resource.h:27
#define TRACKBAR_CLASS
Definition: commctrl.h:1985
HWND wave_win
Definition: sndrec32.cpp:38
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define SUBLANG_DEFAULT
Definition: nls.h:168
#define IDR_MENU1
Definition: resource.h:6
static HDC
Definition: imagelist.c:92
#define BUTSTART_ID
Definition: sndrec32.h:22
#define CALLBACK
Definition: compat.h:27
BOOL WINAPI UpdateWindow(_In_ HWND)
#define TBM_SETRANGE
Definition: commctrl.h:2009
HWND hWnd
Definition: settings.c:17
WNDPROC buttons_std_proc
Definition: sndrec32.cpp:43
#define SystemParametersInfo
Definition: winuser.h:5759
LONG top
Definition: windef.h:292
snd::audio_waveout * AUD_OUT
Definition: sndrec32.cpp:70
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define ZeroMemory
Definition: winbase.h:1635
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define CS_HREDRAW
Definition: winuser.h:648
LPCSTR lpstrDefExt
Definition: commdlg.h:345
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define TBM_SETPOS
Definition: commctrl.h:2008
#define ID_FILE_OPEN
Definition: resource.h:42
BOOL display_dur
Definition: sndrec32.cpp:48
#define IDB_BITMAP2_STOP_DIS
Definition: resource.h:4
#define IDI_SNDREC32
Definition: resource.h:12
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
HICON hIconSm
Definition: winuser.h:3186
#define IDC_REACTOS_SNDREC32
Definition: resource.h:14
LONG left
Definition: windef.h:291
HWND slider
Definition: sndrec32.cpp:39
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SLIDER_ID
Definition: sndrec32.h:27
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
int32_t INT_PTR
Definition: typedefs.h:62
WORD slider_min
Definition: sndrec32.cpp:51
LONG right
Definition: windef.h:293
BOOL WINAPI DestroyWindow(_In_ HWND)
#define BM_SETIMAGE
Definition: winuser.h:1904
#define DWORD
Definition: nt_native.h:44
#define LANG_HEBREW
Definition: nls.h:67
#define GetOpenFileName
Definition: commdlg.h:665
WPARAM wParam
Definition: combotst.c:138
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define WAVEBAR_TIMERTIME
Definition: sndrec32.h:62
CHAR * LPTSTR
Definition: xmlstorage.h:192
ATOM MyRegisterClass(HINSTANCE hInstance)
Definition: sndrec32.cpp:248
TCHAR str_dur[MAX_LOADSTRING]
Definition: sndrec32.cpp:59
#define IDS_STRDUR
Definition: resource.h:33
DWORD nMaxFile
Definition: commdlg.h:337
BOOL stopped_flag
Definition: sndrec32.cpp:46
#define SLIDER_CY
Definition: sndrec32.h:37
OPENFILENAME ofn
Definition: sndrec32.cpp:56
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define GetSaveFileName
Definition: commdlg.h:666
#define DialogBox
Definition: winuser.h:5662
#define PS_SOLID
Definition: wingdi.h:585
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1032
#define LoadAccelerators
Definition: winuser.h:5711
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HINSTANCE hInstance
Definition: charmap.c:20
void l_audio_arrival(unsigned int samples_arrival)
Definition: sndrec32.cpp:924
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define STRBUF_X
Definition: sndrec32.h:47
#define ETO_OPAQUE
Definition: wingdi.h:646
#define MB_YESNO
Definition: winuser.h:811
HINSTANCE hInstance
Definition: winuser.h:3180
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL InitInstance(HINSTANCE, int)
Definition: sndrec32.cpp:270
#define REFRESHB_X
Definition: sndrec32.h:71
#define TBM_GETPOS
Definition: commctrl.h:2003
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
Definition: sndrec32.cpp:107
#define IDD_ABOUTBOX
Definition: resource.h:8
#define ID_FILE_EXIT
Definition: resource.h:47
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define STRFMT_Y
Definition: sndrec32.h:51
#define BUTTONS_SPACE
Definition: sndrec32.h:34
#define GENERIC_WRITE
Definition: nt_native.h:90
#define ShellExecute
Definition: shellapi.h:689
#define IDS_STRMONO
Definition: resource.h:36
#define CreateWindowEx
Definition: winuser.h:5656
#define TRANSPARENT
Definition: wingdi.h:949
#define CW_USEDEFAULT
Definition: winuser.h:225
#define MAKELONG(a, b)
Definition: typedefs.h:248
size_t __cdecl _tcslen(const _TCHAR *str)
Definition: tcslen.h:9
smooth NULL
Definition: ftsmooth.c:416
TCHAR str_fmt[MAX_LOADSTRING]
Definition: sndrec32.cpp:61
#define REFRESHB_Y
Definition: sndrec32.h:72
#define MB_ICONQUESTION
Definition: winuser.h:783
LONG_PTR LPARAM
Definition: windef.h:208
UINT cbSize
Definition: winuser.h:3175
snd::audio_membuffer * AUD_BUF
Definition: sndrec32.cpp:69
TCHAR str_pos[MAX_LOADSTRING]
Definition: sndrec32.cpp:58
#define WAVEBAR_CY
Definition: sndrec32.h:59
#define ID_ABOUT
Definition: charmap.c:18
#define BUTTONS_W
Definition: sndrec32.h:31
#define ID_FILE_SAVE
Definition: resource.h:43
BOOL win_first
Definition: sndrec32.cpp:35
#define SB_ENDSCROLL
Definition: winuser.h:574
#define OPEN_EXISTING
Definition: compat.h:426
#define IDS_STRFMT
Definition: resource.h:35
#define UlongToPtr(u)
Definition: config.h:106
HBRUSH hbrBackground
Definition: winuser.h:3183
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define b
Definition: ke_i.h:79
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
#define IDB_BITMAP2_START
Definition: resource.h:19
#define ID_FILE_NEW
Definition: resource.h:41
#define IDS_STRCHAN
Definition: resource.h:39
TCHAR str_mono[10]
Definition: sndrec32.cpp:64
#define BLACK_BRUSH
Definition: wingdi.h:895
#define STRFMT_X
Definition: sndrec32.h:50
TCHAR szWindowClass[MAX_LOADSTRING]
Definition: sndrec32.cpp:26
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1716
FORCEINLINE VOID SetPixel(IN ULONG Left, IN ULONG Top, IN UCHAR Color)
Definition: vga.c:93
NONCLIENTMETRICS s_info
Definition: sndrec32.cpp:75
#define LoadBitmap
Definition: winuser.h:5712
#define STRPOS_Y
Definition: sndrec32.h:42
#define WS_CAPTION
Definition: pedump.c:624
#define CS_VREDRAW
Definition: winuser.h:653
char TCHAR
Definition: xmlstorage.h:189
GLfloat f
Definition: glext.h:7540
snd::audio_wavein * AUD_IN
Definition: sndrec32.cpp:71
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define _T(x)
Definition: vfdio.h:22
#define REFRESHB_CX
Definition: sndrec32.h:73
#define REFRESHA_CY
Definition: sndrec32.h:69
VOID enable_but(DWORD id)
Definition: sndrec32.cpp:933
#define WS_OVERLAPPED
Definition: pedump.c:615
#define d
Definition: ke_i.h:81
#define INITIAL_BUFREC_SECONDS
Definition: sndrec32.h:20
#define WM_TIMER
Definition: winuser.h:1724
#define MF_ENABLED
Definition: winuser.h:128
RECT text2_rect
Definition: sndrec32.cpp:78
#define WM_CLOSE
Definition: winuser.h:1603
#define MAX_PATH
Definition: compat.h:26
DWORD lStructSize
Definition: commdlg.h:329
const char file[]
Definition: icontest.c:11
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
int cbWndExtra
Definition: winuser.h:3179
RECT cli
Definition: sndrec32.cpp:79
WORD slider_max
Definition: sndrec32.cpp:52
#define ID_FILE_SAVEAS
Definition: resource.h:44
#define WM_PAINT
Definition: winuser.h:1602
#define STRCHAN_Y
Definition: sndrec32.h:54
#define ExtTextOut
Definition: wingdi.h:4449
#define TBS_NOTICKS
Definition: commctrl.h:1995
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define WAVEBAR_TIMERID
Definition: sndrec32.h:61
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
#define STRDUR_X
Definition: sndrec32.h:44
HICON hIcon
Definition: winuser.h:3181
HDC hdc
Definition: main.c:9
#define COLOR_BTNFACE
Definition: winuser.h:918
#define MB_ICONERROR
Definition: winuser.h:781
#define BS_BITMAP
Definition: winuser.h:258
#define REFRESHB_CY
Definition: sndrec32.h:74
#define SB_PAGELEFT
Definition: winuser.h:570
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
#define MessageBox
Definition: winuser.h:5723
#define GENERIC_READ
Definition: compat.h:124
#define IDB_BITMAP2_END
Definition: resource.h:20
#define WM_COMMAND
Definition: winuser.h:1722
DWORD slider_pos
Definition: sndrec32.cpp:50
void l_buffer_resized(unsigned int new_size)
Definition: sndrec32.cpp:929
#define WM_USER
Definition: winuser.h:1877
#define LoadCursor
Definition: winuser.h:5713
#define gprintf
Definition: sndrec32.cpp:19
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define SLIDER_CX
Definition: sndrec32.h:36
#define REFRESHA_CX
Definition: sndrec32.h:68
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2880
#define STRBUF_Y
Definition: sndrec32.h:48
#define BUTREC_ID
Definition: sndrec32.h:26
#define REFRESHA_X
Definition: sndrec32.h:66
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL butdisabled[5]
Definition: sndrec32.cpp:45
#define CREATE_ALWAYS
Definition: disk.h:72
#define SW_SHOWNORMAL
Definition: winuser.h:764
int cbClsExtra
Definition: winuser.h:3178
#define TEXT(s)
Definition: k32.h:26
#define WS_MINIMIZEBOX
Definition: pedump.c:631
HWND buttons[5]
Definition: sndrec32.cpp:40
IN OUT PVCB OUT PDIRENT OUT PBCB IN BOOLEAN CreateFile
Definition: fatprocs.h:904
LPSTR lpstrFile
Definition: commdlg.h:336
#define IDB_BITMAP2_REC_DIS
Definition: resource.h:29
BOOL write_wav(TCHAR *f)
Definition: sndrec32.cpp:1065
#define STRPOS_X
Definition: sndrec32.h:41
#define OFN_OVERWRITEPROMPT
Definition: commdlg.h:116
BOOL s_recording
Definition: sndrec32.cpp:73
#define SB_PAGERIGHT
Definition: winuser.h:571
#define IDS_STRPOS
Definition: resource.h:32
LPCSTR lpstrFilter
Definition: commdlg.h:332
VOID disable_but(DWORD id)
Definition: sndrec32.cpp:939
#define CreateFontIndirect
Definition: wingdi.h:4439
unsigned int UINT
Definition: ndis.h:50
#define WM_HSCROLL
Definition: winuser.h:1725
#define MB_OK
Definition: winuser.h:784
HBITMAP butbmps[5]
Definition: sndrec32.cpp:41
#define IMAGE_BITMAP
Definition: winuser.h:211
#define IDS_APP_TITLE
Definition: resource.h:10
#define GetMessage
Definition: winuser.h:5691
#define TBS_HORZ
Definition: commctrl.h:1989
#define IDS_STRSTEREO
Definition: resource.h:37
BOOL isnew
Definition: sndrec32.cpp:47
HINSTANCE hInst
Definition: sndrec32.cpp:24
#define BUTTONS_CX
Definition: sndrec32.h:33
#define BUTSTOP_ID
Definition: sndrec32.h:25
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)
Definition: sndrec32.cpp:446
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
CONST void * LPCVOID
Definition: windef.h:191
#define ID_EDIT_AUDIOPROPS
Definition: resource.h:56
#define SendMessage
Definition: winuser.h:5744
#define WM_CREATE
Definition: winuser.h:1590
GLenum GLuint id
Definition: glext.h:5579
BOOL InitInstance_wave(HWND, HINSTANCE, int)
Definition: sndrec32.cpp:323
RECT text_rect
Definition: sndrec32.cpp:77
#define MAKELANGID(p, s)
Definition: nls.h:15
LONG bottom
Definition: windef.h:294
#define WAVEBAR_X
Definition: sndrec32.h:56
#define BUTEND_ID
Definition: sndrec32.h:23
#define CREATE_NEW
Definition: disk.h:69
static HBITMAP
Definition: button.c:44
#define BUTTONS_H
Definition: sndrec32.h:30
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:863
#define SLIDER_W
Definition: sndrec32.h:39
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5620
#define LoadIcon
Definition: winuser.h:5714
#define IDB_BITMAP2_START_DIS
Definition: resource.h:30
#define MF_GRAYED
Definition: winuser.h:129
#define WAVEBAR_Y
Definition: sndrec32.h:57
#define MAINWINDOW_W
Definition: sndrec32.h:15
#define MAINWINDOW_H
Definition: sndrec32.h:16
#define STRDUR_Y
Definition: sndrec32.h:45
#define WAVEBAR_CX
Definition: sndrec32.h:58
#define IDB_BITMAP2_REC
Definition: resource.h:23
LONG_PTR LRESULT
Definition: windef.h:209
BOOL path_set
Definition: sndrec32.cpp:67
#define BUTPLAY_ID
Definition: sndrec32.h:24
#define WS_VISIBLE
Definition: pedump.c:620
HBRUSH WINAPI GetSysColorBrush(_In_ int)
BOOL WINAPI ReadFile(IN HANDLE hFile, IN LPVOID lpBuffer, IN DWORD nNumberOfBytesToRead, OUT LPDWORD lpNumberOfBytesRead OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:123
#define WS_SYSMENU
Definition: pedump.c:629
ATOM MyRegisterClass_wave(HINSTANCE hInstance)
Definition: sndrec32.cpp:301
TCHAR str_chan[MAX_LOADSTRING]
Definition: sndrec32.cpp:62
HMENU WINAPI GetMenu(_In_ HWND)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define BUTTONS_CY
Definition: sndrec32.h:32
#define WS_EX_STATICEDGE
Definition: winuser.h:403
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define SLIDER_H
Definition: sndrec32.h:38
#define LoadString
Definition: winuser.h:5720
#define APIENTRY
Definition: api.h:79
#define __int64
Definition: basetyps.h:16
HWND main_win
Definition: sndrec32.cpp:37
TCHAR file_path[MAX_PATH]
Definition: sndrec32.cpp:57
TCHAR str_buf[MAX_LOADSTRING]
Definition: sndrec32.cpp:60
DWORD Flags
Definition: commdlg.h:342
Definition: fci.c:126
#define IDB_BITMAP2_PLAY
Definition: resource.h:21