Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

239 lines
6.2 KiB

  1. /****************************************************************************
  2. *
  3. * sbtest.h
  4. *
  5. * Copyright (c) 1991 Microsoft Corporation. All Rights Reserved.
  6. *
  7. ***************************************************************************/
  8. #include "options.h"
  9. #include "record.h"
  10. #include "riff.h"
  11. #include "stdio.h"
  12. #define dbgOut wpfOut(hPrintfWnd, ach)
  13. extern char ach[256];
  14. /****************************************************************************
  15. *
  16. * defines
  17. *
  18. ***************************************************************************/
  19. #define MAXFILENAME 256
  20. // string resource ids
  21. #define IDS_APPNAME 1
  22. // menu ids
  23. #define IDM_ABOUT 101
  24. #define IDM_EXIT 102
  25. #define IDM_PLAYWAVE 201
  26. #define IDM_SNDPLAYSOUND 202
  27. #define IDM_LOOPOFF 211
  28. #define IDM_LOOP2 212
  29. #define IDM_LOOP100 213
  30. #define IDM_LOOPBREAK 214
  31. #define IDM_RESET 221
  32. #define IDM_POSITION 222
  33. #define IDM_PAUSE 223
  34. #define IDM_RESUME 224
  35. #define IDM_VOLUME 225
  36. #define IDM_AUX_VOLUME 226
  37. #define IDM_RECORD 231
  38. #define IDM_D0 301
  39. #define IDM_D1 302
  40. #define IDM_D2 303
  41. #define IDM_D3 304
  42. #define IDM_D4 305
  43. #define IDM_D5 306
  44. #define IDM_D6 307
  45. #define IDM_D7 308
  46. #define IDM_D8 309
  47. #define IDM_D9 310
  48. #define IDM_D10 311
  49. #define IDM_D11 312
  50. #define IDM_D12 313
  51. #define IDM_D13 314
  52. #define IDM_D14 315
  53. #define IDM_D15 316
  54. #define LASTPORT 15
  55. #define IDM_D0 301
  56. #define IDM_D1 302
  57. #define IDM_D2 303
  58. #define IDM_D3 304
  59. #define IDM_D4 305
  60. #define IDM_D5 306
  61. #define IDM_D6 307
  62. #define IDM_D7 308
  63. #define IDM_D8 309
  64. #define IDM_D9 310
  65. #define IDM_D10 311
  66. #define IDM_D11 312
  67. #define IDM_D12 313
  68. #define IDM_D13 314
  69. #define IDM_D14 315
  70. #define IDM_D15 316
  71. #define LASTPORT 15
  72. #define IDM_C0 321
  73. #define IDM_C1 322
  74. #define IDM_C2 323
  75. #define IDM_C3 324
  76. #define IDM_C4 325
  77. #define IDM_C5 326
  78. #define IDM_C6 327
  79. #define IDM_C7 328
  80. #define IDM_C8 329
  81. #define IDM_C9 330
  82. #define IDM_C10 331
  83. #define IDM_C11 332
  84. #define IDM_C12 333
  85. #define IDM_C13 334
  86. #define IDM_C14 335
  87. #define IDM_C15 336
  88. #define IDM_INSTRUMENT 341
  89. #define IDM_KEYBOARD 342
  90. #define IDM_I0 401
  91. #define IDM_I1 402
  92. #define IDM_I2 403
  93. #define IDM_I3 404
  94. #define IDM_I4 405
  95. #define IDM_I5 406
  96. #define IDM_I6 407
  97. #define IDM_I7 408
  98. #define IDM_I8 409
  99. #define IDM_I9 410
  100. #define IDM_I10 411
  101. #define IDM_I11 412
  102. #define IDM_I12 413
  103. #define IDM_I13 414
  104. #define IDM_I14 415
  105. #define IDM_I15 416
  106. #define IDM_STARTMIDIIN 417
  107. #define IDM_STOPMIDIIN 418
  108. #define IDM_GETINFO 501
  109. #define IDM_DUMPNOTES 601
  110. #define IDM_DUMPPATCH 602
  111. #define IDM_RIP 603
  112. #define IDM_WAVEOPTIONS 701
  113. #define IDM_MIDIOPTIONS 702
  114. #define IDM_PROFSTART 801
  115. #define IDM_PROFSTOP 802
  116. // miscellaneous defines
  117. #define MAXPLAYERS 100
  118. #define NOTEVELOCITY 80
  119. #define DEBUG_PATCH 1
  120. #define DEBUG_NOTE 2
  121. #define ISBITSET(f,b) ((f) & (b))
  122. #define SETBIT(f,b) ((f)|=(b))
  123. #define RESETBIT(f,b) ((f)&=(~b))
  124. /****************************************************************************
  125. *
  126. * typedefs
  127. *
  128. ***************************************************************************/
  129. typedef union shortmsg_tag {
  130. BYTE b[4];
  131. DWORD dw;
  132. } SHORTMSG;
  133. typedef struct playitem_tag {
  134. LPWAVEHDR lpHdr;
  135. LPSTR lpData;
  136. HANDLE hMem;
  137. HANDLE hData;
  138. BOOL bResource;
  139. } PLAYITEM;
  140. /****************************************************************************
  141. *
  142. * extern declarations
  143. *
  144. ***************************************************************************/
  145. // about.c
  146. extern void About(HWND hWnd);
  147. extern int FAR PASCAL AboutDlgProc(HWND, unsigned, UINT, LONG);
  148. // callback.c
  149. extern void FAR PASCAL SBMidiInCallback(HMIDIIN hMidiIn, UINT wMsg,
  150. DWORD dwInstance, DWORD dwParam1, DWORD dwParam2);
  151. // init.c
  152. extern HANDLE hAccTable;
  153. extern int gInstBase;
  154. extern HWND hMainWnd;
  155. extern BOOL InitFirstInstance(HANDLE hInstance);
  156. extern BOOL InitEveryInstance(HANDLE hInstance, int cmdShow);
  157. extern void InitMenus(HWND hWnd);
  158. extern int sbtestError(LPSTR msg);
  159. // inst.c
  160. extern HWND hInstWnd;
  161. extern BYTE bInstrument;
  162. extern void CreateInstrument(HWND hWnd);
  163. extern long FAR PASCAL InstWndProc(HWND, unsigned, UINT, LONG);
  164. // keyb.c
  165. extern HWND hKeyWnd;
  166. extern void CreateKeyboard(HWND hParent);
  167. extern long FAR PASCAL KeyWndProc(HWND, unsigned, UINT, LONG);
  168. // options.c
  169. extern void WaveOptions(HWND hWnd);
  170. extern int FAR PASCAL WaveOptionsDlgProc(HWND, unsigned, UINT, LONG);
  171. extern void MidiOptions(HWND hWnd);
  172. extern int FAR PASCAL MidiOptionsDlgProc(HWND, unsigned, UINT, LONG);
  173. // playfile.c
  174. extern HWAVEOUT hWaveOut;
  175. extern int iWaveOut;
  176. extern void PlayFile(LPSTR fname);
  177. // pos.c
  178. extern HWND hPosWnd;
  179. extern void CreatePosition(HWND hParent);
  180. extern long FAR PASCAL PosWndProc(HWND, unsigned, UINT, LONG);
  181. extern void ShowPos(void);
  182. // record.c
  183. extern HWAVEIN hWaveIn;
  184. extern void Record(HWND hWnd);
  185. extern int FAR PASCAL RecordDlgProc(HWND, unsigned, UINT, LONG);
  186. // sbtest.c
  187. extern HMIDIOUT hMidiOut;
  188. extern HANDLE ghInst;
  189. extern char szAppName[];
  190. extern HWND hPrintfWnd;
  191. extern int fDebug;
  192. extern BYTE bChannel;
  193. extern UINT wLoops;
  194. extern void GetInfo(void);
  195. extern int PASCAL WinMain(HANDLE, HANDLE, LPSTR, int);
  196. extern long FAR PASCAL MainWndProc(HWND, unsigned, UINT, LONG);
  197. extern LPSTR lpRecordBuf;
  198. extern DWORD dwBlockSize;
  199. extern DWORD dwRecorded;
  200. extern DWORD dwDataSize;