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.

114 lines
3.8 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. // mulaw.h - interface to mulaw functions in mulaw.c
  24. ////
  25. #ifndef __MULAW_H__
  26. #define __MULAW_H__
  27. #include "winlocal.h"
  28. #include "wavfmt.h"
  29. #define MULAW_VERSION 0x00000108
  30. // handle to a mulaw engine instance
  31. //
  32. DECLARE_HANDLE32(HMULAW);
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. // these macros for compatibility with old code
  37. //
  38. #define MulawFormat(lpwfx, nSamplesPerSec) \
  39. WavFormatMulaw(lpwfx, nSamplesPerSec)
  40. // MulawInit - initialize mulaw engine
  41. // <dwVersion> (i) must be MULAW_VERSION
  42. // <hInst> (i) instance handle of calling module
  43. // <dwFlags> (i) reserved; must be 0
  44. // return handle (NULL if error)
  45. //
  46. HMULAW DLLEXPORT WINAPI MulawInit(DWORD dwVersion, HINSTANCE hInst, DWORD dwFlags);
  47. // MulawTerm - shut down mulaw engine
  48. // <hMulaw> (i) handle returned from MulawInit
  49. // return 0 if success
  50. //
  51. int DLLEXPORT WINAPI MulawTerm(HMULAW hMulaw);
  52. // MulawReset - reset mulaw engine
  53. // <hMulaw> (i) handle returned from MulawInit
  54. // return 0 if success
  55. //
  56. int DLLEXPORT WINAPI MulawReset(HMULAW hMulaw);
  57. // MulawDecode - decode mulaw samples
  58. // <hMulaw> (i) handle returned from MulawInit
  59. // <lpabMulaw> (i) array of encoded samples
  60. // <lpaiPcm> (o) array of decoded samples
  61. // <uSamples> (i) number of samples to decode
  62. // return 0 if success
  63. //
  64. // NOTE: each BYTE in <lpabMulaw> contains 1 8-bit encoded sample
  65. // in Mulaw format.
  66. // Each PCM16 in <lpaiPcm> contains 1 16-bit decoded sample
  67. // in standard PCM format.
  68. //
  69. int DLLEXPORT WINAPI MulawDecode(HMULAW hMulaw, LPBYTE lpabMulaw, LPPCM16 lpaiPcm, UINT uSamples);
  70. // MulawEncode - encode mulaw samples
  71. // <hMulaw> (i) handle returned from MulawInit
  72. // <lpaiPcm> (i) array of decoded samples
  73. // <lpabMulaw> (o) array of encoded samples
  74. // <uSamples> (i) number of samples to encode
  75. // return 0 if success
  76. //
  77. // NOTE: each BYTE in <lpabMulaw> contains 1 8-bit encoded sample
  78. // in Mulaw format.
  79. // Each PCM16 in <lpaiPcm> contains 1 16-bit decoded sample
  80. // in standard PCM format.
  81. //
  82. int DLLEXPORT WINAPI MulawEncode(HMULAW hMulaw, LPPCM16 lpaiPcm, LPBYTE lpabMulaw, UINT uSamples);
  83. // MulawIOProc - i/o procedure for mulaw format file data
  84. // <lpmmioinfo> (i/o) information about open file
  85. // <uMessage> (i) message indicating the requested I/O operation
  86. // <lParam1> (i) message specific parameter
  87. // <lParam2> (i) message specific parameter
  88. // returns 0 if message not recognized, otherwise message specific value
  89. //
  90. // NOTE: the address of this function should be passed to the WavOpen()
  91. // or mmioInstallIOProc() functions for accessing mulaw format file data.
  92. //
  93. LRESULT DLLEXPORT CALLBACK MulawIOProc(LPTSTR lpmmioinfo,
  94. UINT uMessage, LPARAM lParam1, LPARAM lParam2);
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif // __MULAW_H__