ReactOS 0.4.16-dev-321-g63bb46a
audio_test.c File Reference
#include <windows.h>
#include <stdio.h>
#include <math.h>
#include <setupapi.h>
#include <ndk/umtypes.h>
#include <ks.h>
#include <ksmedia.h>
#include "interface.h"
Include dependency graph for audio_test.c:

Go to the source code of this file.

Macros

#define _UNICODE
 
#define UNICODE
 
#define WIN32_NO_STATUS
 
#define _KSDDK_
 
#define _2pi   6.283185307179586476925286766559
 

Functions

VOID TestKs ()
 
int __cdecl main (int argc, char *argv[])
 

Variables

GUID CategoryGuid = {STATIC_KSCATEGORY_AUDIO}
 
const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}}
 
const GUID KSPROPSETID_Connection = {0x1D58C920L, 0xAC9B, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}
 
const GUID KSPROPSETID_Sysaudio = {0xCBE3FAA0L, 0xCC75, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}}
 
const GUID KSPROPSETID_General = {0x1464EDA5L, 0x6A8F, 0x11D1, {0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}
 
const GUID KSINTERFACESETID_Standard = {0x1A8766A0L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}
 
const GUID KSMEDIUMSETID_Standard = {0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}
 
const GUID KSDATAFORMAT_TYPE_AUDIO = {0x73647561L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}
 
const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}
 
const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {0x05589f81L, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}}
 

Macro Definition Documentation

◆ _2pi

#define _2pi   6.283185307179586476925286766559

Definition at line 15 of file audio_test.c.

◆ _KSDDK_

#define _KSDDK_

Definition at line 4 of file audio_test.c.

◆ _UNICODE

#define _UNICODE

Definition at line 1 of file audio_test.c.

◆ UNICODE

Definition at line 2 of file audio_test.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 3 of file audio_test.c.

Function Documentation

◆ main()

int __cdecl main ( int argc  ,
char argv[] 
)

Definition at line 243 of file audio_test.c.

244{
246 PSHORT SoundBuffer;
247 ULONG i = 0;
248 BOOL Status;
249 OVERLAPPED Overlapped;
251 HANDLE hWdmAud;
253
254 TestKs();
255 return 0;
256
257 hWdmAud = CreateFileW(L"\\\\.\\wdmaud",
259 0,
260 NULL,
263 NULL);
264 if (!hWdmAud)
265 {
266 printf("Failed to open wdmaud with %lx\n", GetLastError());
267 return -1;
268 }
269
270 printf("WDMAUD: opened\n");
271
272 /* clear device info */
274
275 ZeroMemory(&Overlapped, sizeof(OVERLAPPED));
276 Overlapped.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
277
278 DeviceInfo.DeviceType = WAVE_OUT_DEVICE_TYPE;
279
280
282
283 if (!Status)
284 {
285 if (WaitForSingleObject(&Overlapped.hEvent, 5000) != WAIT_OBJECT_0)
286 {
287 printf("Failed to get num of wave out devices with %lx\n", GetLastError());
288 CloseHandle(hWdmAud);
289 return -1;
290 }
291 }
292
293 printf("WDMAUD: Num Devices %lu\n", DeviceInfo.DeviceCount);
294
295 if (!DeviceInfo.DeviceCount)
296 {
297 CloseHandle(hWdmAud);
298 return 0;
299 }
300
302
303 if (!Status)
304 {
305 if (WaitForSingleObject(&Overlapped.hEvent, 5000) != WAIT_OBJECT_0)
306 {
307 printf("Failed to get iocaps %lx\n", GetLastError());
308 }
309 }
310 printf("WDMAUD: Capabilities NumChannels %x dwFormats %lx\n", DeviceInfo.u.WaveOutCaps.wChannels, DeviceInfo.u.WaveOutCaps.dwFormats);
311
312 DeviceInfo.u.WaveFormatEx.cbSize = sizeof(WAVEFORMATEX);
313 DeviceInfo.u.WaveFormatEx.wFormatTag = WAVE_FORMAT_PCM;
314 DeviceInfo.u.WaveFormatEx.nChannels = 2;
315 DeviceInfo.u.WaveFormatEx.nSamplesPerSec = 48000;
316 DeviceInfo.u.WaveFormatEx.nBlockAlign = 4;
317 DeviceInfo.u.WaveFormatEx.nAvgBytesPerSec = 48000 * 4;
318 DeviceInfo.u.WaveFormatEx.wBitsPerSample = 16;
319
320
321
323 if (!Status)
324 {
325 if (WaitForSingleObject(&Overlapped.hEvent, 5000) != WAIT_OBJECT_0)
326 {
327 printf("Failed to open device with %lx\n", GetLastError());
328 CloseHandle(hWdmAud);
329 return -1;
330 }
331 }
332
333 printf("WDMAUD: opened device\n");
334
335 //
336 // Allocate a buffer for 1 second
337 //
338 Length = 48000 * 4;
340
341 //
342 // Fill the buffer with a 500 Hz sine tone
343 //
344 while (i < Length / 2)
345 {
346 //
347 // Generate the wave for each channel:
348 // Amplitude * sin( Sample * Frequency * 2PI / SamplesPerSecond )
349 //
350 SoundBuffer[i] = 0x7FFF * sin(0.5 * (i - 1) * 500 * _2pi / 48000);
351 i++;
352 SoundBuffer[i] = 0x7FFF * sin((0.5 * i - 2) * 500 * _2pi / 48000);
353 i++;
354 }
355
356 DeviceInfo.u.State = KSSTATE_RUN;
358 if (!Status)
359 {
360 if (WaitForSingleObject(&Overlapped.hEvent, 5000) != WAIT_OBJECT_0)
361 {
362 printf("Failed to set device into run state %lx\n", GetLastError());
363 CloseHandle(hWdmAud);
364 return -1;
365 }
366 }
367
368 //
369 // Play our 1-second buffer
370 //
371 DeviceInfo.Header.Data = (PUCHAR)SoundBuffer;
372 DeviceInfo.Header.DataUsed = DeviceInfo.Header.FrameExtent = Length;
374 if (!Status)
375 {
376 if (WaitForSingleObject(&Overlapped.hEvent, 5000) != WAIT_OBJECT_0)
377 {
378 printf("Failed to play buffer %lx\n", GetLastError());
379 CloseHandle(hWdmAud);
380 return -1;
381 }
382 }
383
384 printf("WDMAUD: Played buffer\n");
385
386 DeviceInfo.u.State = KSSTATE_STOP;
388 if (!Status)
389 {
390 if (WaitForSingleObject(&Overlapped.hEvent, 5000) != WAIT_OBJECT_0)
391 {
392 printf("Failed to set device into stop state %lx\n", GetLastError());
393 CloseHandle(hWdmAud);
394 return -1;
395 }
396 }
397 printf("WDMAUD: STOPPED\n");
398 CloseHandle(&Overlapped.hEvent);
399 CloseHandle(hWdmAud);
400 printf("WDMAUD: COMPLETE\n");
401 return 0;
402}
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
#define _2pi
Definition: audio_test.c:15
VOID TestKs()
Definition: audio_test.c:30
#define WAVE_FORMAT_PCM
Definition: constants.h:425
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define GetProcessHeap()
Definition: compat.h:736
#define OPEN_EXISTING
Definition: compat.h:775
#define HeapAlloc
Definition: compat.h:733
#define GENERIC_READ
Definition: compat.h:135
#define CreateFileW
Definition: compat.h:741
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define printf
Definition: freeldr.h:97
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
@ KSSTATE_RUN
Definition: ks.h:1218
@ KSSTATE_STOP
Definition: ks.h:1215
#define FILE_FLAG_OVERLAPPED
Definition: disk.h:46
#define GENERIC_WRITE
Definition: nt_native.h:90
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define L(x)
Definition: ntvdm.h:50
@ WAVE_OUT_DEVICE_TYPE
Definition: sndtypes.h:29
WCHAR Data[ANYSIZE_ARRAY]
HANDLE hEvent
Definition: winbase.h:845
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
int16_t * PSHORT
Definition: typedefs.h:55
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
Definition: wdfiotarget.h:1052
#define IOCTL_OPEN_WDMAUD
Definition: interface.h:82
#define IOCTL_GETCAPABILITIES
Definition: interface.h:204
#define IOCTL_SETDEVICE_STATE
Definition: interface.h:134
#define IOCTL_GETNUMDEVS_TYPE
Definition: interface.h:117
#define IOCTL_WRITEDATA
Definition: interface.h:221
#define ZeroMemory
Definition: winbase.h:1737
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define WAIT_OBJECT_0
Definition: winbase.h:432

◆ TestKs()

VOID TestKs ( )

Definition at line 30 of file audio_test.c.

31{
32 SP_DEVICE_INTERFACE_DATA InterfaceData;
37 PKSPIN_CONNECT PinConnect;
42 HANDLE FilterHandle;
43 HANDLE PinHandle;
44 PSHORT SoundBuffer;
45 UINT i = 0;
48
49 //
50 // Get a handle to KS Audio Interfaces
51 //
53 NULL,
54 NULL,
55 DIGCF_DEVICEINTERFACE); //DIGCF_PRESENT
56
57 printf("DeviceHandle %p\n", DeviceHandle);
58
59 //
60 // Enumerate the first interface
61 //
62 InterfaceData.cbSize = sizeof(InterfaceData);
63 InterfaceData.Reserved = 0;
65 NULL,
67 1,
68 &InterfaceData);
69
70 printf("SetupDiEnumDeviceInterfaces %u Error %ld\n", Result, GetLastError());
71
72 //
73 // Get the interface details (namely the device path)
74 //
77 0,
78 Length);
79 DetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
80 DeviceData.cbSize = sizeof(DeviceData);
81 DeviceData.Reserved = 0;
83 &InterfaceData,
84 DetailData,
85 Length,
86 NULL,
87 &DeviceData);
88
89 wprintf(L"SetupDiGetDeviceInterfaceDetail %u Path DetailData %s\n", Result, (LPWSTR)&DetailData->DevicePath[0]);
90
91 //
92 // Open a handle to the device
93 //
94 FilterHandle = CreateFile(DetailData->DevicePath,
96 0,
97 NULL,
100 NULL);
101
102 printf("Handle %p\n", FilterHandle);
103
104 //
105 // Close the interface handle and clean up
106 //
108
109 //
110 // Allocate a KS Pin Connection Request Structure
111 //
113 printf("Length %ld KSPIN %Iu DATAFORMAT %Iu\n", Length, sizeof(KSPIN_CONNECT), sizeof(KSDATAFORMAT_WAVEFORMATEX));
114 PinConnect = (PKSPIN_CONNECT)HeapAlloc(GetProcessHeap(), 0, Length);
115 DataFormat = (PKSDATAFORMAT_WAVEFORMATEX)(PinConnect + 1);
116
117 //
118 // Setup the KS Pin Data
119 //
122 PinConnect->Interface.Flags = 0;
123 PinConnect->Medium.Set = KSMEDIUMSETID_Standard;
124 PinConnect->Medium.Id = KSMEDIUM_TYPE_ANYINSTANCE;
125 PinConnect->Medium.Flags = 0;
126 PinConnect->PinId = 0;
127 PinConnect->PinToHandle = NULL;
129 PinConnect->Priority.PrioritySubClass = 1;
130
131 //
132 // Setup the KS Data Format Information
133 //
134 DataFormat->WaveFormatEx.wFormatTag = WAVE_FORMAT_PCM;
135 DataFormat->WaveFormatEx.nChannels = 2;
136 DataFormat->WaveFormatEx.nSamplesPerSec = 48000;
137 DataFormat->WaveFormatEx.nBlockAlign = 4;
138 DataFormat->WaveFormatEx.nAvgBytesPerSec = 48000 * 4;
139 DataFormat->WaveFormatEx.wBitsPerSample = 16;
140 DataFormat->WaveFormatEx.cbSize = 0;
141 DataFormat->DataFormat.FormatSize = sizeof(KSDATAFORMAT) +
142 sizeof(WAVEFORMATEX);
143 DataFormat->DataFormat.Flags = KSDATAFORMAT_ATTRIBUTES;
144 DataFormat->DataFormat.Reserved = 0;
145 DataFormat->DataFormat.MajorFormat = KSDATAFORMAT_TYPE_AUDIO;
146 DataFormat->DataFormat.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
147 DataFormat->DataFormat.Specifier = KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
148 DataFormat->DataFormat.SampleSize = 4;
149
150 //
151 // Create the pin
152 //
153 Status = KsCreatePin(FilterHandle, PinConnect, GENERIC_WRITE, &PinHandle);
154
155 printf("PinHandle %p Status %lx\n", PinHandle, Status);
156
157 //
158 // Allocate a buffer for 1 second
159 //
160 Length = 48000 * 4;
161 SoundBuffer = (PSHORT)HeapAlloc(GetProcessHeap(), 0, Length);
162
163 //
164 // Fill the buffer with a 500 Hz sine tone
165 //
166 while (i < Length / 2)
167 {
168 //
169 // Generate the wave for each channel:
170 // Amplitude * sin( Sample * Frequency * 2PI / SamplesPerSecond )
171 //
172 SoundBuffer[i] = 0x7FFF * sin(0.5 * (i - 1) * 500 * _2pi / 48000);
173 i++;
174 SoundBuffer[i] = 0x7FFF * sin((0.5 * i - 2) * 500 * _2pi / 48000);
175 i++;
176 }
177
178 //
179 // Create and fill out the KS Stream Packet
180 //
183 sizeof(KSSTREAM_HEADER));
184 Packet->Data = SoundBuffer;
185 Packet->FrameExtent = Length;
186 Packet->DataUsed = Length;
187 Packet->Size = sizeof(KSSTREAM_HEADER);
188 Packet->PresentationTime.Numerator = 1;
189 Packet->PresentationTime.Denominator = 1;
190
191 //
192 // Setup a KS Property to change the state
193 //
198
199 //
200 // Change the state to run
201 //
203 DeviceIoControl(PinHandle,
205 Property,
206 sizeof(KSPROPERTY),
207 &State,
208 sizeof(State),
209 &Length,
210 NULL);
211
212 //
213 // Play our 1-second buffer
214 //
215 DeviceIoControl(PinHandle,
217 NULL,
218 0,
219 Packet,
220 Packet->Size,
221 &Length,
222 NULL);
223
224 //
225 // Change the state to stop
226 //
228 DeviceIoControl(PinHandle,
230 Property,
231 sizeof(KSPROPERTY),
232 &State,
233 sizeof(State),
234 &Length,
235 NULL);
236
237 CloseHandle(PinHandle);
238 CloseHandle(FilterHandle);
239}
const GUID KSPROPSETID_Connection
Definition: audio_test.c:20
const GUID KSINTERFACESETID_Standard
Definition: audio_test.c:23
GUID CategoryGuid
Definition: audio_test.c:17
const GUID KSDATAFORMAT_TYPE_AUDIO
Definition: audio_test.c:25
const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
Definition: audio_test.c:27
const GUID KSDATAFORMAT_SUBTYPE_PCM
Definition: audio_test.c:26
const GUID KSMEDIUMSETID_Standard
Definition: audio_test.c:24
LONG NTSTATUS
Definition: precomp.h:26
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, CONST GUID *InterfaceClassGuid, DWORD MemberIndex, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
Definition: devinst.c:2780
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2893
#define KSPROPERTY_TYPE_SET
Definition: dmksctrl.h:43
struct KSIDENTIFIER KSPROPERTY
struct KSIDENTIFIER * PKSPROPERTY
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
Definition: hubbusif.h:121
#define KSPRIORITY_NORMAL
Definition: ks.h:1386
#define KSMEDIUM_TYPE_ANYINSTANCE
Definition: ks.h:301
@ KSPROPERTY_CONNECTION_STATE
Definition: ks.h:349
struct KSSTREAM_HEADER * PKSSTREAM_HEADER
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
struct KSPIN_CONNECT * PKSPIN_CONNECT
KSSTATE
Definition: ks.h:1214
#define KSDATAFORMAT_ATTRIBUTES
Definition: ks.h:55
@ KSINTERFACE_STANDARD_STREAMING
Definition: ks.h:283
#define IOCTL_KS_WRITE_STREAM
Definition: ks.h:139
struct KSDATAFORMAT_WAVEFORMATEX * PKSDATAFORMAT_WAVEFORMATEX
KSDDKAPI DWORD NTAPI KsCreatePin(HANDLE FilterHandle, PKSPIN_CONNECT Connect, ACCESS_MASK DesiredAccess, PHANDLE ConnectionHandle)
Definition: ksuser.c:192
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1549
unsigned int UINT
Definition: ndis.h:50
SP_DEVICE_INTERFACE_DETAIL_DATA_A SP_DEVICE_INTERFACE_DETAIL_DATA
Definition: setupapi.h:1149
#define SetupDiGetDeviceInterfaceDetail
Definition: setupapi.h:2601
#define DIGCF_DEVICEINTERFACE
Definition: setupapi.h:174
#define SetupDiGetClassDevs
Definition: setupapi.h:2593
SP_DEVICE_INTERFACE_DETAIL_DATA_A * PSP_DEVICE_INTERFACE_DETAIL_DATA
Definition: setupapi.h:1150
ULONG Id
Definition: dmksctrl.h:77
ULONG Flags
Definition: dmksctrl.h:78
GUID Set
Definition: dmksctrl.h:76
ULONG PinId
Definition: ks.h:2603
KSPIN_MEDIUM Medium
Definition: ks.h:2602
KSPRIORITY Priority
Definition: ks.h:2605
KSPIN_INTERFACE Interface
Definition: ks.h:2601
HANDLE PinToHandle
Definition: ks.h:2604
ULONG PriorityClass
Definition: ks.h:1391
ULONG PrioritySubClass
Definition: ks.h:1392
CHAR DevicePath[ANYSIZE_ARRAY]
Definition: setupapi.h:851
#define wprintf(...)
Definition: whoami.c:18
#define CreateFile
Definition: winbase.h:3774
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by main().

Variable Documentation

◆ CategoryGuid

GUID CategoryGuid = {STATIC_KSCATEGORY_AUDIO}

Definition at line 17 of file audio_test.c.

Referenced by TestKs().

◆ KSDATAFORMAT_SPECIFIER_WAVEFORMATEX

const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {0x05589f81L, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}}

Definition at line 27 of file audio_test.c.

Referenced by TestKs().

◆ KSDATAFORMAT_SUBTYPE_PCM

const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}

Definition at line 26 of file audio_test.c.

Referenced by TestKs().

◆ KSDATAFORMAT_TYPE_AUDIO

const GUID KSDATAFORMAT_TYPE_AUDIO = {0x73647561L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}

Definition at line 25 of file audio_test.c.

Referenced by TestKs().

◆ KSINTERFACESETID_Standard

const GUID KSINTERFACESETID_Standard = {0x1A8766A0L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}

Definition at line 23 of file audio_test.c.

Referenced by TestKs().

◆ KSMEDIUMSETID_Standard

const GUID KSMEDIUMSETID_Standard = {0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}

Definition at line 24 of file audio_test.c.

Referenced by TestKs().

◆ KSPROPSETID_Connection

const GUID KSPROPSETID_Connection = {0x1D58C920L, 0xAC9B, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}

Definition at line 20 of file audio_test.c.

Referenced by TestKs().

◆ KSPROPSETID_General

const GUID KSPROPSETID_General = {0x1464EDA5L, 0x6A8F, 0x11D1, {0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}

Definition at line 22 of file audio_test.c.

◆ KSPROPSETID_Pin

const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}}

Definition at line 19 of file audio_test.c.

◆ KSPROPSETID_Sysaudio

const GUID KSPROPSETID_Sysaudio = {0xCBE3FAA0L, 0xCC75, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}}

Definition at line 21 of file audio_test.c.