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.

158 lines
4.2 KiB

  1. /****************************************************************************
  2. *
  3. * mmdrv.h
  4. *
  5. * Multimedia kernel driver support component (mmdrv)
  6. *
  7. * Copyright (c) 1991-1998 Microsoft Corporation
  8. *
  9. * Local declarations :
  10. *
  11. * -- Debug
  12. * -- Device types
  13. * -- Routine prototypes
  14. *
  15. * History
  16. * 01-Feb-1992 - Robin Speed (RobinSp) wrote it
  17. *
  18. ***************************************************************************/
  19. /****************************************************************************
  20. General includes
  21. ***************************************************************************/
  22. #define UNICODE
  23. #ifndef RC_INVOKED
  24. #include <string.h>
  25. #include <stdio.h>
  26. #endif /* RC_INVOKED */
  27. #include <windows.h>
  28. #include <mmsystem.h>
  29. #include <devioctl.h>
  30. #include <mmddk.h>
  31. #if DBG
  32. #define STATIC
  33. #else
  34. #define STATIC
  35. #endif
  36. /***************************************************************************
  37. DEBUGGING SUPPORT
  38. ***************************************************************************/
  39. #if DBG
  40. #define DEBUG_RETAIL
  41. extern int mmdrvDebugLevel;
  42. extern void mmdrvDbgOut(LPSTR lpszFormat, ...);
  43. extern void dDbgAssert(LPSTR exp, LPSTR file, int line);
  44. DWORD __dwEval;
  45. #define dprintf( _x_ ) mmdrvDbgOut _x_
  46. #define dprintf1( _x_ ) if (mmdrvDebugLevel >= 1) mmdrvDbgOut _x_
  47. #define dprintf2( _x_ ) if (mmdrvDebugLevel >= 2) mmdrvDbgOut _x_
  48. #define dprintf3( _x_ ) if (mmdrvDebugLevel >= 3) mmdrvDbgOut _x_
  49. #define dprintf4( _x_ ) if (mmdrvDebugLevel >= 4) mmdrvDbgOut _x_
  50. #define WinAssert(exp) \
  51. ((exp) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__))
  52. #define WinEval(exp) \
  53. ((__dwEval=(DWORD)(exp)) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__), __dwEval)
  54. #else
  55. #define WinAssert(x) 0
  56. #define WinEval(exp) exp
  57. #define dprintf(x)
  58. #define dprintf1(x)
  59. #define dprintf2(x)
  60. #define dprintf3(x)
  61. #define dprintf4(x)
  62. #endif
  63. /****************************************************************************
  64. Device Types
  65. ***************************************************************************/
  66. enum {
  67. InvalidDevice,
  68. WaveInDevice,
  69. WaveOutDevice,
  70. MidiInDevice,
  71. MidiOutDevice,
  72. AuxDevice
  73. };
  74. /****************************************************************************
  75. Our heap
  76. ****************************************************************************/
  77. HANDLE hHeap;
  78. /****************************************************************************
  79. Our serialization
  80. ****************************************************************************/
  81. CRITICAL_SECTION mmDrvCritSec; // Serialize access to device lists
  82. /****************************************************************************
  83. Local routines
  84. ***************************************************************************/
  85. DWORD sndTranslateStatus(void);
  86. MMRESULT sndOpenDev(UINT DeviceType, DWORD dwId,
  87. PHANDLE phDev, DWORD Access);
  88. DWORD sndGetNumDevs(UINT DeviceType);
  89. MMRESULT sndSetData(UINT DeviceType, UINT DeviceId, UINT Length, PBYTE Data,
  90. ULONG Ioctl);
  91. MMRESULT sndGetData(UINT DeviceType, UINT DeviceId, UINT Length, PBYTE Data,
  92. ULONG Ioctl);
  93. MMRESULT sndGetHandleData(HANDLE hDev,
  94. DWORD dwSize,
  95. PVOID pData,
  96. ULONG Ioctl,
  97. HANDLE hEvent);
  98. MMRESULT sndSetHandleData(HANDLE hDev,
  99. DWORD dwSize,
  100. PVOID pData,
  101. ULONG Ioctl,
  102. HANDLE hEvent);
  103. VOID TerminateWave(VOID);
  104. VOID TerminateMidi(VOID);
  105. /****************************************************************************
  106. Our local driver procs
  107. ****************************************************************************/
  108. DWORD APIENTRY widMessage(DWORD, DWORD, DWORD_PTR, DWORD_PTR, DWORD_PTR);
  109. DWORD APIENTRY wodMessage(DWORD, DWORD, DWORD_PTR, DWORD_PTR, DWORD_PTR);
  110. DWORD APIENTRY midMessage(DWORD, DWORD, DWORD_PTR, DWORD_PTR, DWORD_PTR);
  111. DWORD APIENTRY modMessage(DWORD, DWORD, DWORD_PTR, DWORD_PTR, DWORD_PTR);