Leaked source code of windows server 2003
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.

144 lines
5.0 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // vox.h - interface to vox file functions in vox.c
  24. ////
  25. #ifndef __VOX_H__
  26. #define __VOX_H__
  27. #include "winlocal.h"
  28. #include "wavfmt.h"
  29. #define VOX_VERSION 0x00000106
  30. // handle to a vox engine instance
  31. //
  32. DECLARE_HANDLE32(HVOX);
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. // these macros for compatibility with old code
  37. //
  38. #define VoxFormat(lpwfx, nSamplesPerSec) \
  39. WavFormatVoxadpcm(lpwfx, nSamplesPerSec)
  40. #define VoxFormatPcm(lpwfx) \
  41. WavFormatPcm(6000, 16, 1, lpwfx)
  42. // VoxInit - initialize vox engine
  43. // <dwVersion> (i) must be VOX_VERSION
  44. // <hInst> (i) instance handle of calling module
  45. // <dwFlags> (i) reserved; must be 0
  46. // return handle (NULL if error)
  47. //
  48. HVOX DLLEXPORT WINAPI VoxInit(DWORD dwVersion, HINSTANCE hInst, DWORD dwFlags);
  49. // VoxTerm - shut down vox engine
  50. // <hVox> (i) handle returned from VoxInit
  51. // return 0 if success
  52. //
  53. int DLLEXPORT WINAPI VoxTerm(HVOX hVox);
  54. // VoxReset - reset vox engine
  55. // <hVox> (i) handle returned from VoxInit
  56. // return 0 if success
  57. //
  58. int DLLEXPORT WINAPI VoxReset(HVOX hVox);
  59. // VoxDecode_16BitMono - decode vox samples
  60. // <hVox> (i) handle returned from VoxInit
  61. // <lpabVox> (i) array of encoded samples
  62. // <lpaiPcm> (o) array of decoded samples
  63. // <uSamples> (i) number of samples to decode
  64. // return 0 if success
  65. //
  66. // NOTE: each BYTE in <lpabVox> contains 2 12-bit encoded samples
  67. // in OKI ADPCM Vox format, as described by Dialogic
  68. // Each PCM16 in <lpaiPcm> contains 1 16-bit decoded sample
  69. // in standard PCM format.
  70. //
  71. int DLLEXPORT WINAPI VoxDecode_16BitMono(HVOX hVox, LPBYTE lpabVox, LPPCM16 lpaiPcm, UINT uSamples);
  72. // VoxEncode_16BitMono - encode vox samples
  73. // <hVox> (i) handle returned from VoxInit
  74. // <lpaiPcm> (i) array of decoded samples
  75. // <lpabVox> (o) array of encoded samples
  76. // <uSamples> (i) number of samples to encode
  77. // return 0 if success
  78. //
  79. // NOTE: each BYTE in <lpabVox> contains 2 12-bit encoded samples
  80. // in OKI ADPCM Vox format, as described by Dialogic
  81. // Each PCM16 in <lpaiPcm> contains 1 16-bit decoded sample
  82. // in standard PCM format.
  83. //
  84. int DLLEXPORT WINAPI VoxEncode_16BitMono(HVOX hVox, LPPCM16 lpaiPcm, LPBYTE lpabVox, UINT uSamples);
  85. // VoxDecode_8BitMono - decode vox samples
  86. // <hVox> (i) handle returned from VoxInit
  87. // <lpabVox> (i) array of encoded samples
  88. // <lpabPcm> (o) array of decoded samples
  89. // <uSamples> (i) number of samples to decode
  90. // return 0 if success
  91. //
  92. // NOTE: each BYTE in <lpabVox> contains 2 12-bit encoded samples
  93. // in OKI ADPCM Vox format, as described by Dialogic
  94. // Each PCM8 in <lpabPcm> contains 1 8-bit decoded sample
  95. // in standard PCM format.
  96. //
  97. int DLLEXPORT WINAPI VoxDecode_8BitMono(HVOX hVox, LPBYTE lpabVox, LPPCM8 lpabPcm, UINT uSamples);
  98. // VoxEncode_8BitMono - encode vox samples
  99. // <hVox> (i) handle returned from VoxInit
  100. // <lpabPcm> (i) array of decoded samples
  101. // <lpabVox> (o) array of encoded samples
  102. // <uSamples> (i) number of samples to encode
  103. // return 0 if success
  104. //
  105. // NOTE: each BYTE in <lpabVox> contains 2 12-bit encoded samples
  106. // in OKI ADPCM Vox format, as described by Dialogic
  107. // Each PCM8 in <lpabPcm> contains 1 8-bit decoded sample
  108. // in standard PCM format.
  109. //
  110. int DLLEXPORT WINAPI VoxEncode_8BitMono(HVOX hVox, LPPCM8 lpabPcm, LPBYTE lpabVox, UINT uSamples);
  111. // VoxIOProc - i/o procedure for vox format file data
  112. // <lpmmioinfo> (i/o) information about open file
  113. // <uMessage> (i) message indicating the requested I/O operation
  114. // <lParam1> (i) message specific parameter
  115. // <lParam2> (i) message specific parameter
  116. // returns 0 if message not recognized, otherwise message specific value
  117. //
  118. // NOTE: the address of this function should be passed to the WavOpen()
  119. // or mmioInstallIOProc() functions for accessing vox format file data.
  120. //
  121. LRESULT DLLEXPORT CALLBACK VoxIOProc(LPTSTR lpmmioinfo,
  122. UINT uMessage, LPARAM lParam1, LPARAM lParam2);
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126. #endif // __VOX_H__