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.

923 lines
24 KiB

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