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.

146 lines
5.5 KiB

  1. /*++ BUILD Version: 0001
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * WMMSTRUC.H
  8. * WOW32 16-bit MultiMedia structure conversion support
  9. *
  10. * History:
  11. * Created 13-Feb-1992 by Mike Tricker (miketri) after jeffpar
  12. *
  13. --*/
  14. /*++
  15. Hack to make the code work with current MIPS compiler, whereby the compiler
  16. can't work out the correct size of a MMTIME16 structure.
  17. --*/
  18. #define MIPS_COMPILER_PACKING_BUG
  19. /**********************************************************************\
  20. *
  21. * The following macros are used to set or clear the done bit in a
  22. * 16 bit wave|midi header structure.
  23. *
  24. \**********************************************************************/
  25. #define COPY_WAVEOUTHDR16_FLAGS( x, y ) \
  26. { \
  27. PWAVEHDR16 pWavHdr; \
  28. DWORD dw; \
  29. \
  30. pWavHdr = (x); \
  31. dw = (y).dwFlags; \
  32. STOREDWORD( pWavHdr->dwFlags, dw ); \
  33. }
  34. #define COPY_MIDIOUTHDR16_FLAGS( x, y ) \
  35. { \
  36. PMIDIHDR16 pMidHdr; \
  37. DWORD dw; \
  38. \
  39. pMidHdr = (x); \
  40. dw = (y).dwFlags; \
  41. STOREDWORD( pMidHdr->dwFlags, dw ); \
  42. }
  43. #define COPY_WAVEINHDR16_FLAGS( x, y ) \
  44. { \
  45. PWAVEHDR16 pWavHdr; \
  46. DWORD dw; \
  47. \
  48. pWavHdr = (x); \
  49. dw = (y).dwFlags; \
  50. STOREDWORD( pWavHdr->dwFlags, dw ); \
  51. dw = (y).dwBytesRecorded; \
  52. STOREDWORD( pWavHdr->dwBytesRecorded, dw ); \
  53. }
  54. #define COPY_MIDIINHDR16_FLAGS( x, y ) \
  55. { \
  56. PMIDIHDR16 pMidHdr; \
  57. DWORD dw; \
  58. \
  59. pMidHdr = (x); \
  60. dw = (y).dwFlags; \
  61. STOREDWORD( pMidHdr->dwFlags, dw ); \
  62. dw = (y).dwBytesRecorded; \
  63. STOREDWORD( pMidHdr->dwBytesRecorded, dw ); \
  64. }
  65. /*++
  66. Call definitions
  67. --*/
  68. #define GETMMTIME16(vp,lp) getmmtime16(FETCHDWORD(vp),lp)
  69. #define GETWAVEHDR16(vp,lp) getwavehdr16(FETCHDWORD(vp), lp)
  70. #define GETMIDIHDR16(vp,lp) getmidihdr16(FETCHDWORD(vp), lp)
  71. #define PUTMMTIME16(vp,lp) putmmtime16(FETCHDWORD(vp),lp)
  72. #define PUTWAVEHDR16(vp,lp) putwavehdr16(FETCHDWORD(vp), lp)
  73. #define PUTWAVEFORMAT16(vp,lp) putwaveformat16(FETCHDWORD(vp), lp)
  74. #define PUTWAVEOUTCAPS16(vp,lp,c) putwaveoutcaps16(FETCHDWORD(vp), lp, c)
  75. #define PUTWAVEINCAPS16(vp,lp,c) putwaveincaps16(FETCHDWORD(vp), lp, c)
  76. #define PUTMIDIHDR16(vp,lp) putmidihdr16(FETCHDWORD(vp), lp)
  77. #define PUTAUXCAPS16(vp,lp,c) putauxcaps16(FETCHDWORD(vp), lp, c)
  78. #define PUTTIMECAPS16(vp,lp,c) puttimecaps16(FETCHDWORD(vp), lp, c)
  79. #define PUTMIDIINCAPS16(vp,lp,c) putmidiincaps16(FETCHDWORD(vp), lp, c)
  80. #define PUTMIDIOUTCAPS16(vp,lp,c) putmidioutcaps16(FETCHDWORD(vp), lp, c)
  81. #define PUTJOYCAPS16(vp,lp,c) putjoycaps16(FETCHDWORD(vp), lp, c)
  82. #define PUTJOYINFO16(vp,lp) putjoyinfo16(FETCHDWORD(vp), lp)
  83. #ifndef DEBUG
  84. #define FREEMMTIME(p)
  85. #define FREEWAVEHDR(p)
  86. #define FREEWAVEOUTCAPS(p)
  87. #define FREEWAVEINCAPS(p)
  88. #define FREEMIDIHDR(p)
  89. #define FREEAUXCAPS(p)
  90. #define FREETIMECAPS(p)
  91. #define FREEMIDIINCAPS(p)
  92. #define FREEMIDIOUTCAPS(p)
  93. #define FREEJOYCAPS(p)
  94. #define FREEJOYINFO(p)
  95. #else
  96. #define FREEMMTIME(p) p=NULL
  97. #define FREEWAVEHDR(p) p=NULL
  98. #define FREEWAVEOUTCAPS(p) p=NULL
  99. #define FREEWAVEINCAPS(p) p=NULL
  100. #define FREEMIDIHDR(p) p=NULL
  101. #define FREEAUXCAPS(p) p=NULL
  102. #define FREETIMECAPS(p) p=NULL
  103. #define FREEMIDIINCAPS(p) p=NULL
  104. #define FREEMIDIOUTCAPS(p) p=NULL
  105. #define FREEJOYCAPS(p) p=NULL
  106. #define FREEJOYINFO(p) p=NULL
  107. #endif
  108. /*++
  109. Function prototypes
  110. --*/
  111. PWAVEHDR16 getwavehdr16(VPWAVEHDR16 vpwhdr, LPWAVEHDR lpwhdr);
  112. VOID putwavehdr16(VPWAVEHDR16 vpwhdr, LPWAVEHDR lpwhdr);
  113. PMIDIHDR16 getmidihdr16(VPMIDIHDR16 vpmhdr, LPMIDIHDR lpmhdr);
  114. VOID putmidihdr16(VPMIDIHDR16 vpmhdr, LPMIDIHDR lpmhdr);
  115. ULONG getmmtime16 (VPMMTIME16 vpmmt, LPMMTIME lpmmt);
  116. ULONG putmmtime16 (VPMMTIME16 vpmmt, LPMMTIME lpmmt);
  117. ULONG putwaveoutcaps16 (VPWAVEOUTCAPS16 vpwoc, LPWAVEOUTCAPS lpwoc, UINT uSize);
  118. ULONG putwaveincaps16 (VPWAVEINCAPS16 vpwic, LPWAVEINCAPS lpwic, UINT uSize);
  119. ULONG putauxcaps16 (VPAUXCAPS16 vpauxc, LPAUXCAPS lpauxc, UINT uSize);
  120. ULONG puttimecaps16 (VPTIMECAPS16 vptimec, LPTIMECAPS lptimec, UINT uSize);
  121. ULONG putmidiincaps16 (VPMIDIINCAPS16 vpmic, LPMIDIINCAPS lpmic, UINT uSize);
  122. ULONG putmidioutcaps16 (VPMIDIOUTCAPS16 vpmoc, LPMIDIOUTCAPS lpmoc, UINT uSize);
  123. ULONG putjoycaps16 (VPJOYCAPS16 vpjoyc, LPJOYCAPS lpjoyc, UINT uSize);
  124. ULONG putjoyinfo16 (VPJOYINFO16 vpjoyi, LPJOYINFO lpjoyi);