1 #ifndef __WDMAUD_H__ 2 #define __WDMAUD_H__ 3 4 #include <stdarg.h> 5 6 #define WIN32_NO_STATUS 7 #define _INC_WINDOWS 8 #define COM_NO_WINDOWS_H 9 10 #include <windef.h> 11 #include <winbase.h> 12 #include <winreg.h> 13 14 #include <winuser.h> 15 #include <mmddk.h> 16 #include <mmebuddy.h> 17 #include <ks.h> 18 #include <ksmedia.h> 19 #include <interface.h> 20 #include <devioctl.h> 21 #include <setupapi.h> 22 23 BOOL 24 WdmAudInitUserModeMixer(VOID); 25 26 ULONG 27 WdmAudGetWaveOutCount(VOID); 28 29 ULONG 30 WdmAudGetWaveInCount(VOID); 31 32 ULONG 33 WdmAudGetMixerCount(VOID); 34 35 MMRESULT 36 WdmAudGetNumWdmDevsByMMixer( 37 IN MMDEVICE_TYPE DeviceType, 38 OUT DWORD* DeviceCount); 39 40 MMRESULT 41 WdmAudCommitWaveBufferByLegacy( 42 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, 43 IN PVOID OffsetPtr, 44 IN DWORD Length, 45 IN PSOUND_OVERLAPPED Overlap, 46 IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine); 47 48 MMRESULT 49 WriteFileEx_Remixer( 50 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, 51 IN PVOID OffsetPtr, 52 IN DWORD Length, 53 IN PSOUND_OVERLAPPED Overlap, 54 IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine); 55 56 MMRESULT 57 WdmAudGetCapabilitiesByMMixer( 58 IN PSOUND_DEVICE SoundDevice, 59 IN DWORD DeviceId, 60 OUT PVOID Capabilities, 61 IN DWORD CapabilitiesSize); 62 63 MMRESULT 64 WdmAudOpenSoundDeviceByMMixer( 65 IN struct _SOUND_DEVICE* SoundDevice, 66 OUT PVOID* Handle); 67 68 MMRESULT 69 WdmAudCloseSoundDeviceByMMixer( 70 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 71 IN PVOID Handle); 72 73 MMRESULT 74 WdmAudGetLineInfo( 75 IN HANDLE hMixer, 76 IN DWORD MixerId, 77 IN LPMIXERLINEW MixLine, 78 IN ULONG Flags); 79 80 MMRESULT 81 WdmAudGetLineControls( 82 IN HANDLE hMixer, 83 IN DWORD MixerId, 84 IN LPMIXERLINECONTROLSW MixControls, 85 IN ULONG Flags); 86 87 MMRESULT 88 WdmAudSetControlDetails( 89 IN HANDLE hMixer, 90 IN DWORD MixerId, 91 IN LPMIXERCONTROLDETAILS MixDetails, 92 IN ULONG Flags); 93 94 MMRESULT 95 WdmAudGetControlDetails( 96 IN HANDLE hMixer, 97 IN DWORD MixerId, 98 IN LPMIXERCONTROLDETAILS MixDetails, 99 IN ULONG Flags); 100 101 MMRESULT 102 WdmAudSetWaveDeviceFormatByMMixer( 103 IN PSOUND_DEVICE_INSTANCE Instance, 104 IN DWORD DeviceId, 105 IN PWAVEFORMATEX WaveFormat, 106 IN DWORD WaveFormatSize); 107 108 MMRESULT 109 WdmAudGetDeviceInterfaceStringByMMixer( 110 IN MMDEVICE_TYPE DeviceType, 111 IN DWORD DeviceId, 112 IN LPWSTR Interface, 113 IN DWORD InterfaceLength, 114 OUT DWORD * InterfaceSize); 115 116 MMRESULT 117 WdmAudSetMixerDeviceFormatByMMixer( 118 IN PSOUND_DEVICE_INSTANCE Instance, 119 IN DWORD DeviceId, 120 IN PWAVEFORMATEX WaveFormat, 121 IN DWORD WaveFormatSize); 122 123 MMRESULT 124 WdmAudQueryMixerInfoByMMixer( 125 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 126 IN DWORD DeviceId, 127 IN UINT uMsg, 128 IN LPVOID Parameter, 129 IN DWORD Flags); 130 131 MMRESULT 132 WdmAudSetWaveStateByMMixer( 133 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 134 IN BOOL bStart); 135 136 MMRESULT 137 WdmAudResetStreamByMMixer( 138 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 139 IN MMDEVICE_TYPE DeviceType, 140 IN BOOLEAN bStartReset); 141 142 MMRESULT 143 WdmAudGetWavePositionByMMixer( 144 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 145 IN MMTIME* Time); 146 147 MMRESULT 148 WdmAudCommitWaveBufferByMMixer( 149 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, 150 IN PVOID OffsetPtr, 151 IN DWORD Length, 152 IN PSOUND_OVERLAPPED Overlap, 153 IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine); 154 155 MMRESULT 156 WdmAudCleanupByMMixer(VOID); 157 158 /* legacy.c */ 159 160 MMRESULT 161 WdmAudCleanupByLegacy(VOID); 162 163 MMRESULT 164 WdmAudGetCapabilitiesByLegacy( 165 IN PSOUND_DEVICE SoundDevice, 166 IN DWORD DeviceId, 167 OUT PVOID Capabilities, 168 IN DWORD CapabilitiesSize); 169 170 MMRESULT 171 WdmAudOpenSoundDeviceByLegacy( 172 IN PSOUND_DEVICE SoundDevice, 173 OUT PVOID *Handle 174 ); 175 176 MMRESULT 177 WdmAudCloseSoundDeviceByLegacy( 178 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 179 IN PVOID Handle); 180 181 MMRESULT 182 WdmAudGetDeviceInterfaceStringByLegacy( 183 IN MMDEVICE_TYPE DeviceType, 184 IN DWORD DeviceId, 185 IN LPWSTR Interface, 186 IN DWORD InterfaceLength, 187 OUT DWORD * InterfaceSize); 188 189 MMRESULT 190 WdmAudSetMixerDeviceFormatByLegacy( 191 IN PSOUND_DEVICE_INSTANCE Instance, 192 IN DWORD DeviceId, 193 IN PWAVEFORMATEX WaveFormat, 194 IN DWORD WaveFormatSize); 195 196 MMRESULT 197 WdmAudQueryMixerInfoByLegacy( 198 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 199 IN DWORD DeviceId, 200 IN UINT uMsg, 201 IN LPVOID Parameter, 202 IN DWORD Flags); 203 204 MMRESULT 205 WdmAudSetWaveDeviceFormatByLegacy( 206 IN PSOUND_DEVICE_INSTANCE Instance, 207 IN DWORD DeviceId, 208 IN PWAVEFORMATEX WaveFormat, 209 IN DWORD WaveFormatSize); 210 211 MMRESULT 212 WdmAudSetWaveStateByLegacy( 213 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 214 IN BOOL bStart); 215 216 MMRESULT 217 WdmAudResetStreamByLegacy( 218 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 219 IN MMDEVICE_TYPE DeviceType, 220 IN BOOLEAN bStartReset); 221 222 MMRESULT 223 WdmAudGetWavePositionByLegacy( 224 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, 225 IN MMTIME* Time); 226 227 MMRESULT 228 WriteFileEx_Committer2( 229 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, 230 IN PVOID OffsetPtr, 231 IN DWORD Length, 232 IN PSOUND_OVERLAPPED Overlap, 233 IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine); 234 235 MMRESULT 236 WdmAudGetNumWdmDevsByLegacy( 237 IN MMDEVICE_TYPE DeviceType, 238 OUT DWORD* DeviceCount); 239 240 DWORD 241 WINAPI 242 MixerEventThreadRoutine( 243 LPVOID Parameter); 244 245 #endif /* __WDMAUD_H__ */ 246