home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / audio / acmapp / acmapp.h < prev    next >
C/C++ Source or Header  |  1997-10-05  |  25KB  |  925 lines

  1. //==========================================================================;
  2. //
  3. //  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. //  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. //  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. //  PURPOSE.
  7. //
  8. //  Copyright (C) 1992 - 1997 Microsoft Corporation.  All Rights Reserved.
  9. //
  10. //--------------------------------------------------------------------------;
  11. //
  12. //  acmapp.h
  13. //
  14. //  Description:
  15. //      This is a sample application that demonstrates how to use the 
  16. //      Audio Compression Manager API's in Windows. This application is
  17. //      also useful as an ACM CODEC driver test.
  18. //
  19. //
  20. //==========================================================================;
  21.  
  22. #ifndef _INC_ACMAPP
  23. #define _INC_ACMAPP                 // #defined if file has been included
  24.  
  25. #ifndef RC_INVOKED
  26. #pragma pack(1)                     // assume byte packing throughout
  27. #endif
  28.  
  29. #ifndef EXTERN_C
  30. #ifdef __cplusplus
  31.     #define EXTERN_C extern "C"
  32. #else
  33.     #define EXTERN_C extern 
  34. #endif
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C"                          // assume C declarations for C++
  39. {
  40. #endif
  41.  
  42.  
  43. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  44. //
  45. //  Application Version Information:
  46. //
  47. //
  48. //
  49. //
  50. //  NOTE! all string resources that will be used in app.rcv for the
  51. //  version resource information *MUST* have an explicit \0 terminator!
  52. //
  53. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  54.  
  55. #if WINVER < 0x0400
  56.  
  57. #define APP_VERSION_MAJOR           3
  58. #define APP_VERSION_MINOR           50
  59. #define APP_VERSION_BUILD           0
  60.  
  61. #ifdef DEBUG
  62. #define APP_ABOUTBOX_DESCRIPTION    "ACM Sample Application version 3.50 (debug)"
  63. #else
  64. #define APP_ABOUTBOX_DESCRIPTION    "ACM Sample Application version 3.50"
  65. #endif
  66. #define APP_ABOUTBOX_PRODUCTNAME    "Microsoft Windows NT"
  67.  
  68. #define APP_VERSION_STRING_RC       "Version 3.50\0"
  69. #define APP_VERSION_PRODUCTNAME_RC  "Microsoft Windows NT\0"
  70.  
  71. #else
  72.  
  73. #define APP_VERSION_MAJOR           4
  74. #define APP_VERSION_MINOR           0
  75. #define APP_VERSION_BUILD           0
  76.  
  77. #ifdef DEBUG
  78. #define APP_ABOUTBOX_DESCRIPTION    "ACM Sample Application version 4.00 (debug)"
  79. #else
  80. #define APP_ABOUTBOX_DESCRIPTION    "ACM Sample Application version 4.00"
  81. #endif
  82. #define APP_ABOUTBOX_PRODUCTNAME    "Microsoft Windows"
  83.  
  84. #define APP_VERSION_STRING_RC       "Version 4.00\0"
  85. #define APP_VERSION_PRODUCTNAME_RC  "Microsoft Windows\0"
  86.  
  87. #endif  // WINVER
  88.  
  89.  
  90. #define APP_VERSION_COMPANYNAME_RC  "Microsoft Corporation\0"
  91. #define APP_VERSION_DESCRIPTION_RC  "ACM Sample Application\0"
  92. #ifdef WIN32
  93. #define APP_VERSION_NAME_RC         "acmapp32.exe\0"
  94. #else
  95. #define APP_VERSION_NAME_RC         "acmapp16.exe\0"
  96. #endif
  97. #define APP_VERSION_COPYRIGHT_RC    "Copyright (C) 1992 - 1997 Microsoft Corp.\0"
  98.  
  99.  
  100.  
  101. //
  102. //
  103. //
  104. #ifndef SIZEOF_WAVEFORMATEX
  105. #define SIZEOF_WAVEFORMATEX(pwfx)   ((WAVE_FORMAT_PCM==(pwfx)->wFormatTag)?sizeof(PCMWAVEFORMAT):(sizeof(WAVEFORMATEX)+(pwfx)->cbSize))
  106. #endif
  107.  
  108.  
  109. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  110. //
  111. //  misc defines for misc sizes and things...
  112. //
  113. //
  114. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  115.  
  116. //
  117. //  bilingual. this allows the same identifier to be used in resource files
  118. //  and code without having to decorate the id in your code.
  119. //
  120. #ifdef RC_INVOKED
  121.     #define RCID(id)    id
  122. #else
  123.     #define RCID(id)    MAKEINTRESOURCE(id)
  124. #endif
  125.  
  126.  
  127. //
  128. //  misc. defines
  129. //
  130. #define APP_MAX_APP_NAME_CHARS      30
  131. #define APP_MAX_APP_NAME_BYTES      (APP_MAX_APP_NAME_CHARS * sizeof(TCHAR))
  132. #define APP_MAX_STRING_RC_CHARS     512
  133. #define APP_MAX_STRING_RC_BYTES     (APP_MAX_STRING_RC_CHARS * sizeof(TCHAR))
  134. #define APP_MAX_STRING_ERROR_CHARS  512
  135. #define APP_MAX_STRING_ERROR_BYTES  (APP_MAX_STRING_ERROR_CHARS * sizeof(TCHAR))
  136.  
  137. #define APP_MAX_STRING_CHARS        128
  138. #define APP_MAX_STRING_BYTES        (APP_MAX_STRING_CHARS * sizeof(TCHAR))
  139. #define APP_MAX_NUMBER_CHARS        144
  140. #define APP_MAX_NUMBER_BYTES        (APP_MAX_NUMBER_CHARS * sizeof(TCHAR))
  141.  
  142. #define APP_MAX_FILE_PATH_CHARS     144
  143. #define APP_MAX_FILE_PATH_BYTES     (APP_MAX_FILE_PATH_CHARS * sizeof(TCHAR))
  144. #define APP_MAX_FILE_TITLE_CHARS    APP_MAX_FILE_PATH_CHARS
  145. #define APP_MAX_FILE_TITLE_BYTES    (APP_MAX_FILE_TITLE_CHARS * sizeof(TCHAR))
  146.  
  147. #define APP_MAX_STRING_INT_CHARS    18
  148. #define APP_MAX_STRING_INT_BYTES    (APP_MAX_STRING_INT_CHARS * sizeof(TCHAR))
  149.  
  150. #define APP_MAX_EXT_DEFAULT_CHARS   4
  151. #define APP_MAX_EXT_DEFAULT_BYTES   (APP_MAX_EXT_DEFAULT_CHARS * sizeof(TCHAR))
  152. #define APP_MAX_EXT_FILTER_CHARS    256
  153. #define APP_MAX_EXT_FILTER_BYTES    (APP_MAX_EXT_FILTER_CHARS * sizeof(TCHAR))
  154.  
  155. #define APP_WINDOW_XOFFSET          CW_USEDEFAULT
  156. #define APP_WINDOW_YOFFSET          CW_USEDEFAULT
  157. #define APP_WINDOW_WIDTH            460             // CW_USEDEFAULT
  158. #define APP_WINDOW_HEIGHT           400             // CW_USEDEFAULT
  159.  
  160.  
  161. //
  162. //  resource defines...
  163. //
  164. #define ICON_APP                    RCID(10)
  165. #define ACCEL_APP                   RCID(15)
  166.  
  167.  
  168. //
  169. //  the application menu...
  170. //
  171. //  NOTE! for our Edit menu, we use the following defines from windows.h--
  172. //  so don't reuse these defines for menu items!
  173. //
  174. //      #define WM_CUT      0x0300
  175. //      #define WM_COPY     0x0301
  176. //      #define WM_PASTE    0x0302
  177. //      #define WM_CLEAR    0x0303
  178. //      #define WM_UNDO     0x0304
  179. //
  180. #define MENU_APP                        RCID(20)
  181. #define APP_MENU_ITEM_FILE              0
  182. #define IDM_FILE_NEW                    1100
  183. #define IDM_FILE_OPEN                   1101
  184. #define IDM_FILE_SAVE                   1102
  185. #define IDM_FILE_SAVEAS                 1103
  186. #define IDM_FILE_SNDPLAYSOUND_PLAY      1104
  187. #define IDM_FILE_SNDPLAYSOUND_STOP      1105
  188. #define IDM_FILE_CONVERT                1106
  189. #define IDM_FILE_CONVERT_ALL            1107
  190. #define IDM_FILE_ABOUT                  1109
  191. #define IDM_FILE_EXIT                   1110
  192.  
  193. #define APP_MENU_ITEM_EDIT              1
  194. #define IDM_EDIT_SELECTALL              1200
  195.  
  196. #define APP_MENU_ITEM_VIEW              2
  197. #define IDM_VIEW_SYSTEMINFO             1300
  198. #define IDM_VIEW_ACM_DRIVERS            1301
  199.  
  200. #define APP_MENU_ITEM_PLAYER            3
  201. #define IDM_PLAYRECORD                  1400
  202.  
  203. #define APP_MENU_ITEM_OPTIONS           4
  204. #define IDM_OPTIONS_WAVEINDEVICE        1500
  205. #define IDM_OPTIONS_WAVEOUTDEVICE       1501
  206. #define IDM_OPTIONS_AUTOOPEN            1505
  207. #define IDM_OPTIONS_DEBUGLOG            1506
  208. #define IDM_OPTIONS_FONT                1509
  209.  
  210. #define IDM_UPDATE                      1600
  211.  
  212.  
  213. //
  214. //  the main window control id's...
  215. //
  216. #define IDD_ACMAPP_EDIT_DISPLAY                 200
  217.  
  218.  
  219. //
  220. //  misc dlg boxes...
  221. //
  222. #define DLG_ABOUT                               RCID(50)
  223. #define IDC_STATIC                              -1
  224. #define IDD_ABOUT_VERSION_OS                    100
  225. #define IDD_ABOUT_VERSION_PLATFORM              101
  226.  
  227. #define DLG_AADRAGDROP                          RCID(55)
  228.  
  229. #define DLG_AADETAILS                           RCID(70)
  230. #define IDD_AADETAILS_EDIT_DETAILS              100
  231.  
  232. #define DLG_AADRIVERS                           RCID(75)
  233. #define IDD_AADRIVERS_STATIC_POSITION           100
  234. #define IDD_AADRIVERS_LIST_DRIVERS              101
  235. #define IDD_AADRIVERS_BTN_DETAILS               102
  236. #define IDD_AADRIVERS_BTN_FORMATS               103
  237. #define IDD_AADRIVERS_BTN_FILTERS               104
  238. #define IDD_AADRIVERS_BTN_ABOUT                 105
  239. #define IDD_AADRIVERS_BTN_CONFIG                106
  240. #define IDD_AADRIVERS_BTN_ABLE                  107
  241. #define IDD_AADRIVERS_BTN_TOTOP                 108
  242.  
  243. #define DLG_AADRIVERFORMATS                     RCID(80)
  244. #define IDD_AADRIVERFORMATS_STATIC_POSITION     100
  245. #define IDD_AADRIVERFORMATS_LIST_FORMATS        101
  246. #define IDD_AADRIVERFORMATS_BTN_DETAILS         102
  247.  
  248.  
  249. #define DLG_AAWAVEDEVICE                        RCID(85)
  250. #define IDD_AAWAVEDEVICE_COMBO_DEVICE           100
  251. #define IDD_AAWAVEDEVICE_EDIT_CAPABILITIES      101
  252.  
  253.  
  254. #define DLG_AACHOOSER                           RCID(90)
  255. #define IDD_AACHOOSER_TXT_FILE_INPUT            100
  256. #define IDD_AACHOOSER_TXT_FORMAT_INPUT          101
  257. #define IDD_AACHOOSER_EDIT_FILE_OUTPUT          110
  258. #define IDD_AACHOOSER_BTN_BROWSE                111
  259. #define IDD_AACHOOSER_COMBO_DRIVER              120
  260. #define IDD_AACHOOSER_BTN_PROPERTIES            121
  261. #define IDD_AACHOOSER_TXT_FORMAT                130
  262. #define IDD_AACHOOSER_BTN_FORMAT                131
  263. #define IDD_AACHOOSER_BTN_FORMAT_OPTIONS        132
  264. #define IDD_AACHOOSER_CHECK_FILTER              140
  265. #define IDD_AACHOOSER_TXT_FILTER                141
  266. #define IDD_AACHOOSER_BTN_FILTER                142
  267. #define IDD_AACHOOSER_BTN_FILTER_OPTIONS        143
  268. #define IDD_AACHOOSER_CHECK_NONREALTIME         150
  269. #define IDD_AACHOOSER_CHECK_ASYNC               151
  270. #define IDD_AACHOOSER_TXT_TIME                  160
  271. #define IDD_AACHOOSER_SCROLL_TIME               161
  272. #define IDD_AACHOOSER_EDIT_DETAILS              170
  273.  
  274.  
  275. #define DLG_AAFORMATENUM                        RCID(91)
  276. #define IDD_AAFORMATENUM_CHECK_CONVERT          100
  277. #define IDD_AAFORMATENUM_CHECK_SUGGEST          101
  278. #define IDD_AAFORMATENUM_CHECK_HARDWARE         102
  279. #define IDD_AAFORMATENUM_CHECK_INPUT            103
  280. #define IDD_AAFORMATENUM_CHECK_OUTPUT           104
  281. #define IDD_AAFORMATENUM_CHECK_WFORMATTAG       105
  282. #define IDD_AAFORMATENUM_EDIT_WFORMATTAG        106
  283. #define IDD_AAFORMATENUM_CHECK_NCHANNELS        107
  284. #define IDD_AAFORMATENUM_EDIT_NCHANNELS         108
  285. #define IDD_AAFORMATENUM_CHECK_NSAMPLESPERSEC   109
  286. #define IDD_AAFORMATENUM_EDIT_NSAMPLESPERSEC    110
  287. #define IDD_AAFORMATENUM_CHECK_WBITSPERSAMPLE   111
  288. #define IDD_AAFORMATENUM_EDIT_WBITSPERSAMPLE    112
  289. #define IDD_AAFORMATENUM_EDIT_NAVGBYTESPERSEC   113
  290. #define IDD_AAFORMATENUM_EDIT_NBLOCKALIGN       114
  291. #define IDD_AAFORMATENUM_EDIT_EXTRA             115
  292.  
  293. #define DLG_AAFILTERENUM                        RCID(92)
  294. #define IDD_AAFILTERENUM_CHECK_DWFILTERTAG      100
  295. #define IDD_AAFILTERENUM_EDIT_DWFILTERTAG       101
  296.  
  297.  
  298. #define DLG_AAPROPERTIES                        RCID(93)
  299. #define IDD_AAPROPERTIES_COMBO_SOURCE           100
  300. #define IDD_AAPROPERTIES_BTN_SOURCE             101
  301. #define IDD_AAPROPERTIES_COMBO_DESTINATION      102
  302. #define IDD_AAPROPERTIES_BTN_DESTINATION        103
  303.  
  304.  
  305. #define DLG_AAFORMATSTYLE                               RCID(94)
  306. #define IDD_AAFORMATSTYLE_CHECK_SHOWHELP                100
  307. #define IDD_AAFORMATSTYLE_CHECK_ENABLEHOOK              101
  308. #define IDD_AAFORMATSTYLE_CHECK_ENABLETEMPLATE          102
  309. #define IDD_AAFORMATSTYLE_CHECK_ENABLETEMPLATEHANDLE    103
  310. #define IDD_AAFORMATSTYLE_CHECK_INITTOWFXSTRUCT         104
  311.  
  312. #define DLG_AAFILTERSTYLE                               RCID(95)
  313. #define IDD_AAFILTERSTYLE_CHECK_SHOWHELP                100
  314. #define IDD_AAFILTERSTYLE_CHECK_ENABLEHOOK              101
  315. #define IDD_AAFILTERSTYLE_CHECK_ENABLETEMPLATE          102
  316. #define IDD_AAFILTERSTYLE_CHECK_ENABLETEMPLATEHANDLE    103
  317. #define IDD_AAFILTERSTYLE_CHECK_INITTOFILTERSTRUCT      104
  318.  
  319.  
  320. #define DLG_AAFORMATCHOOSE_TEMPLATE             RCID(98)
  321. #define DLG_AAFILTERCHOOSE_TEMPLATE             RCID(99)
  322.  
  323.  
  324.  
  325. #define DLG_AACONVERT                           RCID(100)
  326. #define IDD_AACONVERT_TXT_INFILEPATH            100
  327. #define IDD_AACONVERT_TXT_OUTFILEPATH           101
  328. #define IDD_AACONVERT_TXT_STATUS                102
  329.  
  330. #define DLG_AAPLAYRECORD                        RCID(110)
  331. #define IDD_AAPLAYRECORD_BTN_PLAY               100
  332. #define IDD_AAPLAYRECORD_BTN_PAUSE              101
  333. #define IDD_AAPLAYRECORD_BTN_STOP               102
  334. #define IDD_AAPLAYRECORD_BTN_START              103
  335. #define IDD_AAPLAYRECORD_BTN_END                104
  336. #define IDD_AAPLAYRECORD_BTN_RECORD             105
  337. #define IDD_AAPLAYRECORD_SCROLL_POSITION        110
  338. #define IDD_AAPLAYRECORD_TXT_POSITION           115
  339. #define IDD_AAPLAYRECORD_EDIT_COMMAND           120
  340. #define IDD_AAPLAYRECORD_EDIT_RESULT            121
  341.  
  342.  
  343.  
  344.  
  345. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  346. //
  347. //  string resources
  348. //
  349. //
  350. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  351.  
  352. #define IDS_APP_NAME                100
  353. #define IDS_FILE_UNTITLED           101
  354.  
  355. #define IDS_OFN_EXT_DEF             125
  356. #define IDS_OFN_EXT_FILTER          126
  357.  
  358. #define IDS_ERROR_ACM_NOT_PRESENT   500
  359. #define IDS_ERROR_ACM_TOO_OLD       501
  360.  
  361. #define IDS_ERROR_OPEN_FAILED       550
  362.  
  363.  
  364.  
  365. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  366. //
  367. //
  368. //
  369. //
  370. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  371.  
  372. //
  373. //
  374. //
  375. //
  376. typedef struct tACMAPPFILEDESC
  377. {
  378.     DWORD           fdwState;
  379.  
  380.     TCHAR           szFileTitle[APP_MAX_FILE_TITLE_CHARS];
  381.     TCHAR           szFilePath[APP_MAX_FILE_PATH_CHARS];
  382.     
  383.     DWORD           cbFileSize;
  384.     UINT            uDosChangeDate;
  385.     UINT            uDosChangeTime;
  386.     DWORD           fdwFileAttributes;
  387.  
  388.     LPWAVEFORMATEX  pwfx;
  389.     UINT            cbwfx;
  390.  
  391.     DWORD           dwDataBytes;
  392.     DWORD           dwDataSamples;
  393.  
  394. } ACMAPPFILEDESC, *PACMAPPFILEDESC;
  395.  
  396. //
  397. //  ACMAPPINST.fdwState flags
  398. //
  399. #define ACMAPPFILEDESC_STATEF_MODIFIED  0x80000000L
  400.  
  401.  
  402.  
  403.  
  404. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  405. //
  406. //  APPINIT.C -- Public helper functions
  407. //
  408. //
  409. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  410.  
  411. LRESULT FNGLOBAL AppCreate
  412. (
  413.     HWND                    hwnd,
  414.     LPCREATESTRUCT          pcs
  415. );
  416.  
  417. LRESULT FNGLOBAL AppQueryEndSession
  418. (
  419.     HWND                    hwnd
  420. );
  421.  
  422. LRESULT FNGLOBAL AppEndSession
  423. (
  424.     HWND                    hwnd,
  425.     BOOL                    fEndSession
  426. );
  427.  
  428. LRESULT FNGLOBAL AppClose
  429. (
  430.     HWND                    hwnd
  431. );
  432.  
  433. HWND FNGLOBAL AppInit
  434. (
  435.     HINSTANCE               hinst,
  436.     HINSTANCE               hinstPrev,
  437.     LPTSTR                  pszCmdLine,
  438.     int                     nCmdShow
  439. );
  440.  
  441. int FNGLOBAL AppExit
  442. (
  443.     HINSTANCE               hinst,
  444.     int                     nResult
  445. );
  446.  
  447.  
  448. LRESULT FNGLOBAL AppGetWindowsVersion
  449. (
  450.     PTSTR                   pszEnvironment,
  451.     PTSTR                   pszPlatform
  452. );
  453.  
  454. LRESULT FNGLOBAL AppWinIniChange
  455. (
  456.     HWND                    hwnd,
  457.     LPCTSTR                 pszSection
  458. );
  459.  
  460. HFONT FNGLOBAL AppChooseFont
  461. (
  462.     HWND                    hwnd,
  463.     HFONT                   hFont,
  464.     PLOGFONT                plf
  465. );
  466.  
  467.  
  468. BOOL FNEXPORT AboutDlgProc
  469. (
  470.     HWND                    hwnd,
  471.     UINT                    uMsg,
  472.     WPARAM                  wParam,
  473.     LPARAM                  lParam
  474. );
  475.  
  476.  
  477. BOOL FNGLOBAL AppProfileWriteBytes
  478. (
  479.     PTSTR                   pszSection,
  480.     PTSTR                   pszKey,
  481.     LPBYTE                  pbStruct,
  482.     UINT                    cbStruct
  483. );
  484.  
  485. BOOL FNGLOBAL AppProfileReadBytes
  486. (
  487.     PTSTR                   pszSection,
  488.     PTSTR                   pszKey,
  489.     LPBYTE                  pbStruct,
  490.     UINT                    cbStruct
  491. );
  492.  
  493.  
  494. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  495. //
  496. //  APP.C -- Public helper functions
  497. //
  498. //
  499. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  500.  
  501. int FNCGLOBAL AppMsgBox
  502. (
  503.     HWND                    hwnd,
  504.     UINT                    fuStyle,
  505.     PTSTR                   pszFormat,
  506.     ...
  507. );
  508.  
  509. int FNCGLOBAL AppMsgBoxId
  510. (
  511.     HWND                    hwnd,
  512.     UINT                    fuStyle,
  513.     UINT                    uIdsFormat,
  514.     ...
  515. );
  516.  
  517. void FNGLOBAL AppHourGlass
  518. (
  519.     BOOL                    fHourGlass
  520. );
  521.  
  522. BOOL FNGLOBAL AppYield
  523. (
  524.     HWND                    hwnd,
  525.     BOOL                    fIsDialog
  526. );
  527.  
  528. BOOL FNGLOBAL AppTitle
  529. (
  530.     HWND                    hwnd,
  531.     PTSTR                   pszFileTitle
  532. );
  533.  
  534. int FNCGLOBAL AppSetWindowText
  535. (
  536.     HWND                    hwnd,
  537.     PTSTR                   pszFormat,
  538.     ...
  539. );
  540.  
  541. int FNCGLOBAL AppSetWindowTextId
  542. (
  543.     HWND                    hwnd,
  544.     UINT                    uIdsFormat,
  545.     ...
  546. );
  547.  
  548. BOOL FNGLOBAL AppFormatBigNumber
  549. (
  550.     LPTSTR                  pszNumber,
  551.     DWORD                   dw
  552. );
  553.  
  554. BOOL FNGLOBAL AppFormatDosDateTime
  555. (
  556.     LPTSTR                  pszDateTime,
  557.     UINT                    uDosDate,
  558.     UINT                    uDosTime
  559. );
  560.  
  561. void FNCGLOBAL AcmAppDebugLog
  562. (
  563.     PTSTR                   pszFormat,
  564.     ...
  565. );
  566.  
  567. int FNCGLOBAL MEditPrintF
  568. (
  569.     HWND                    hedit,
  570.     PTSTR                   pszFormat,
  571.     ...
  572. );
  573.  
  574. BOOL FNGLOBAL AppGetFileTitle
  575. (
  576.     PTSTR                   pszFilePath,
  577.     PTSTR                   pszFileTitle
  578. );
  579.  
  580. BOOL FNGLOBAL AppGetFileName
  581. (
  582.     HWND                    hwnd,
  583.     PTSTR                   pszFilePath,
  584.     PTSTR                   pszFileTitle,
  585.     UINT                    fuFlags
  586. );
  587.  
  588. BOOL FNGLOBAL AppFileNew
  589. (
  590.     HWND                    hwnd,
  591.     PACMAPPFILEDESC         paafd,
  592.     BOOL                    fCreate
  593. );
  594.  
  595.  
  596. //
  597. //  fuFlags for AppGetFileName()...
  598. //
  599. #define APP_GETFILENAMEF_OPEN       0x0000
  600. #define APP_GETFILENAMEF_SAVE       0x0001
  601.  
  602.  
  603. BOOL FNGLOBAL AppFileSave
  604. (
  605.     HWND                    hwnd,
  606.     PACMAPPFILEDESC         paafd,
  607.     BOOL                    fSaveAs
  608. );
  609.  
  610.  
  611. LRESULT FNEXPORT AppWndProc
  612. (
  613.     HWND                    hwnd,
  614.     UINT                    uMsg,
  615.     WPARAM                  wParam,
  616.     LPARAM                  lParam
  617. );
  618.  
  619.  
  620.  
  621. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  622. //
  623. //  file manipulation functions
  624. //
  625. //
  626. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  627.  
  628. //
  629. //
  630. //
  631. //
  632. #ifndef WIN32
  633. DWORD FNGLOBAL DosGetFileAttributes
  634. (
  635.     LPTSTR                  pszFilePath
  636. );
  637.  
  638. #ifndef FILE_ATTRIBUTE_READONLY
  639. #define FILE_ATTRIBUTE_READONLY         0x00000001  
  640. #define FILE_ATTRIBUTE_HIDDEN           0x00000002  
  641. #define FILE_ATTRIBUTE_SYSTEM           0x00000004  
  642. #define FILE_ATTRIBUTE_DIRECTORY        0x00000010  
  643. #define FILE_ATTRIBUTE_ARCHIVE          0x00000020  
  644. #define FILE_ATTRIBUTE_NORMAL           0x00000080  
  645. #define FILE_ATTRIBUTE_TEMPORARY        0x00000100  
  646. #define FILE_ATTRIBUTE_ATOMIC_WRITE     0x00000200  
  647. #define FILE_ATTRIBUTE_XACTION_WRITE    0x00000400  
  648. #endif
  649. #endif
  650.  
  651. MMRESULT FNGLOBAL AcmAppFormatChoose
  652. (
  653.     HWND                    hwnd,
  654.     LPWAVEFORMATEX          pwfx,
  655.     UINT                    cbwfx,
  656.     DWORD                   fdwStyle
  657. );
  658.  
  659. BOOL FNGLOBAL AcmAppFileSaveModified
  660. (
  661.     HWND                    hwnd,
  662.     PACMAPPFILEDESC         paafd
  663. );
  664.  
  665. BOOL FNGLOBAL AcmAppFileNew
  666. (
  667.     HWND                    hwnd,
  668.     PACMAPPFILEDESC         paafd
  669. );
  670.  
  671. BOOL FNGLOBAL AcmAppFileOpen
  672. (
  673.     HWND                    hwnd,
  674.     PACMAPPFILEDESC         paafd
  675. );
  676.  
  677. BOOL FNGLOBAL AcmAppFileSave
  678. (
  679.     HWND                    hwnd,
  680.     PACMAPPFILEDESC         paafd,
  681.     PTSTR                   pszFilePath,
  682.     PTSTR                   pszFileTitle,
  683.     UINT                    fuSave
  684. );
  685.  
  686.  
  687.  
  688. BOOL FNGLOBAL AcmAppFileConvert
  689. (
  690.     HWND                    hwnd,
  691.     PACMAPPFILEDESC         paafd
  692. );
  693.  
  694. BOOL FNGLOBAL AcmAppMultiThreadedConvertAll
  695. (
  696.     HWND                    hwnd,
  697.     PACMAPPFILEDESC         paafd
  698. );
  699.  
  700. BOOL FNGLOBAL AcmAppFileFilter
  701. (
  702.     HWND                    hwnd,
  703.     PACMAPPFILEDESC         paafd
  704. );
  705.  
  706.  
  707. BOOL FNGLOBAL AcmAppDisplayFileProperties
  708. (
  709.     HWND                    hedit,
  710.     PACMAPPFILEDESC         paafd
  711. );
  712.  
  713.  
  714.  
  715. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  716. //
  717. //
  718. //
  719. //
  720. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  721.  
  722. BOOL FNEXPORT AcmAppDriversDlgProc
  723. (
  724.     HWND                    hwnd,
  725.     UINT                    uMsg,
  726.     WPARAM                  wParam,
  727.     LPARAM                  lParam
  728. );
  729.  
  730.  
  731. BOOL FNGLOBAL AcmAppGetFormatDescription
  732. (
  733.     LPWAVEFORMATEX          pwfx,
  734.     LPTSTR                  pszFormatTag,
  735.     LPTSTR                  pszFormat
  736. );
  737.  
  738. BOOL FNGLOBAL AcmAppGetFilterDescription
  739. (
  740.     LPWAVEFILTER            pwfltr,
  741.     LPTSTR                  pszFilterTag,
  742.     LPTSTR                  pszFilter
  743. );
  744.  
  745.  
  746. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  747. //
  748. //
  749. //
  750. //
  751. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  752.  
  753. BOOL FNEXPORT AcmAppSystemInfoDlgProc
  754. (
  755.     HWND                    hwnd,
  756.     UINT                    uMsg,
  757.     WPARAM                  wParam,
  758.     LPARAM                  lParam
  759. );
  760.  
  761.  
  762.  
  763.  
  764. BOOL FNEXPORT AcmAppPlayRecord
  765. (
  766.     HWND                    hwnd,
  767.     UINT                    uMsg,
  768.     WPARAM                  wParam,
  769.     LPARAM                  lParam
  770. );
  771.  
  772.  
  773. BOOL FNEXPORT AcmAppWaveDeviceDlgProc
  774. (
  775.     HWND                    hwnd,
  776.     UINT                    uMsg,
  777.     WPARAM                  wParam,
  778.     LPARAM                  lParam
  779. );
  780.  
  781.  
  782. BOOL FNGLOBAL AcmAppGetErrorString
  783. (
  784.     MMRESULT                mmr,
  785.     LPTSTR                  pszError
  786. );
  787.  
  788. //
  789. //
  790. //
  791. #define WM_ACMAPP_ACM_NOTIFY        (WM_USER + 100)
  792.  
  793.  
  794. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  795. //
  796. //  misc functions
  797. //
  798. //
  799. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  800.  
  801. BOOL FNGLOBAL AcmAppChooseFont
  802. (
  803.     HWND                    hwnd
  804. );
  805.  
  806.  
  807.  
  808. //
  809. //
  810. //
  811. //
  812. typedef struct tAACONVERTDESC
  813. {
  814.     HACMDRIVERID        hadid;
  815.     HACMDRIVER          had;
  816.     HACMSTREAM          has;
  817.     DWORD               fdwOpen;
  818.  
  819.     HMMIO               hmmioSrc;
  820.     HMMIO               hmmioDst;
  821.  
  822.     MMCKINFO            ckDst;
  823.     MMCKINFO            ckDstRIFF;
  824.  
  825.     UINT                uBufferTimePerConvert;
  826.  
  827.     TCHAR               szFilePathSrc[APP_MAX_FILE_PATH_CHARS];
  828.     LPWAVEFORMATEX      pwfxSrc;
  829.     LPBYTE              pbSrc;
  830.     DWORD               dwSrcSamples;
  831.     DWORD               cbSrcData;
  832.     DWORD               cbSrcReadSize;
  833.     TCHAR               szSrcFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
  834.     TCHAR               szSrcFormat[ACMFORMATDETAILS_FORMAT_CHARS];
  835.  
  836.     TCHAR               szFilePathDst[APP_MAX_FILE_PATH_CHARS];
  837.     LPWAVEFORMATEX      pwfxDst;
  838.     LPBYTE              pbDst;
  839.     DWORD               cbDstBufSize;
  840.     TCHAR               szDstFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
  841.     TCHAR               szDstFormat[ACMFORMATDETAILS_FORMAT_CHARS];
  842.  
  843.     BOOL                fApplyFilter;
  844.     LPWAVEFILTER        pwfltr;
  845.     TCHAR               szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  846.     TCHAR               szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  847.  
  848.     ACMSTREAMHEADER     ash;
  849.  
  850.     DWORD               cTotalConverts;
  851.     DWORD               dwTimeTotal;
  852.     DWORD               dwTimeShortest;
  853.     DWORD               dwShortestConvert;
  854.     DWORD               dwTimeLongest;
  855.     DWORD               dwLongestConvert;
  856.  
  857. } AACONVERTDESC, *PAACONVERTDESC;
  858.  
  859.  
  860.  
  861. BOOL FNEXPORT AcmAppDlgProcChooser
  862. (
  863.     HWND                    hwnd,
  864.     UINT                    uMsg,
  865.     WPARAM                  wParam,
  866.     LPARAM                  lParam
  867. );
  868.  
  869.  
  870.  
  871. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  872. //
  873. //  global variables, etc.
  874. //
  875. //
  876. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  877.  
  878. //
  879. //  flags for gfuAppOptions
  880. //
  881. #define APP_OPTIONSF_AUTOOPEN   0x0001
  882. #define APP_OPTIONSF_DEBUGLOG   0x0004
  883.  
  884. extern HINSTANCE            ghinst;
  885. extern BOOL                 gfAcmAvailable;
  886. extern UINT                 gfuAppOptions;
  887. extern HFONT                ghfontApp;
  888. extern HACMDRIVERID         ghadidNotify;
  889.  
  890. extern UINT                 guWaveInId;
  891. extern UINT                 guWaveOutId;
  892.  
  893. extern TCHAR                gszNull[];
  894. extern TCHAR                gszAppProfile[];
  895. extern TCHAR                gszYes[];
  896. extern TCHAR                gszNo[];
  897.  
  898. extern TCHAR                gszAppName[APP_MAX_APP_NAME_CHARS];
  899. extern TCHAR                gszFileUntitled[APP_MAX_FILE_TITLE_CHARS];
  900.  
  901. extern TCHAR                gszInitialDirOpen[APP_MAX_FILE_PATH_CHARS];
  902. extern TCHAR                gszInitialDirSave[APP_MAX_FILE_PATH_CHARS];
  903.  
  904. extern TCHAR                gszLastSaveFile[APP_MAX_FILE_PATH_CHARS];
  905.  
  906.  
  907. extern ACMAPPFILEDESC       gaafd;
  908.  
  909.  
  910. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; 
  911. //
  912. //
  913. //
  914. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; 
  915.  
  916. #ifndef RC_INVOKED
  917. #pragma pack()                      // revert to default packing
  918. #endif
  919.  
  920. #ifdef __cplusplus
  921. }                                   // end of extern "C" { 
  922. #endif
  923.  
  924. #endif // _INC_ACMAPP
  925.