15#define _2pi 6.283185307179586476925286766559
19const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}};
20const GUID KSPROPSETID_Connection = {0x1D58C920L, 0xAC9B, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
21const GUID KSPROPSETID_Sysaudio = {0xCBE3FAA0L, 0xCC75, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}};
22const GUID KSPROPSETID_General = {0x1464EDA5L, 0x6A8F, 0x11D1, {0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}};
23const GUID KSINTERFACESETID_Standard = {0x1A8766A0L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
24const GUID KSMEDIUMSETID_Standard = {0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
25const GUID KSDATAFORMAT_TYPE_AUDIO = {0x73647561L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
26const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
27const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {0x05589f81L, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
62 InterfaceData.
cbSize =
sizeof(InterfaceData);
102 printf(
"Handle %p\n", FilterHandle);
126 PinConnect->
PinId = 0;
136 DataFormat->WaveFormatEx.nSamplesPerSec = 48000;
138 DataFormat->WaveFormatEx.nAvgBytesPerSec = 48000 * 4;
172 SoundBuffer[
i] = 0x7FFF *
sin(0.5 * (
i - 1) * 500 *
_2pi / 48000);
174 SoundBuffer[
i] = 0x7FFF *
sin((0.5 *
i - 2) * 500 *
_2pi / 48000);
184 Packet->Data = SoundBuffer;
188 Packet->PresentationTime.Numerator = 1;
189 Packet->PresentationTime.Denominator = 1;
270 printf(
"WDMAUD: opened\n");
310 printf(
"WDMAUD: Capabilities NumChannels %x dwFormats %lx\n",
DeviceInfo.u.WaveOutCaps.wChannels,
DeviceInfo.u.WaveOutCaps.dwFormats);
315 DeviceInfo.u.WaveFormatEx.nSamplesPerSec = 48000;
317 DeviceInfo.u.WaveFormatEx.nAvgBytesPerSec = 48000 * 4;
318 DeviceInfo.u.WaveFormatEx.wBitsPerSample = 16;
333 printf(
"WDMAUD: opened device\n");
350 SoundBuffer[
i] = 0x7FFF *
sin(0.5 * (
i - 1) * 500 *
_2pi / 48000);
352 SoundBuffer[
i] = 0x7FFF *
sin((0.5 *
i - 2) * 500 *
_2pi / 48000);
384 printf(
"WDMAUD: Played buffer\n");
397 printf(
"WDMAUD: STOPPED\n");
400 printf(
"WDMAUD: COMPLETE\n");
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
const GUID KSPROPSETID_Pin
const GUID KSPROPSETID_Connection
const GUID KSINTERFACESETID_Standard
const GUID KSDATAFORMAT_TYPE_AUDIO
const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
const GUID KSDATAFORMAT_SUBTYPE_PCM
const GUID KSPROPSETID_General
const GUID KSMEDIUMSETID_Standard
const GUID KSPROPSETID_Sysaudio
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)
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, CONST GUID *InterfaceClassGuid, DWORD MemberIndex, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
#define KSPROPERTY_TYPE_SET
struct KSIDENTIFIER KSPROPERTY
struct KSIDENTIFIER * PKSPROPERTY
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
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
#define KSPRIORITY_NORMAL
#define KSMEDIUM_TYPE_ANYINSTANCE
@ KSPROPERTY_CONNECTION_STATE
struct KSSTREAM_HEADER * PKSSTREAM_HEADER
#define IOCTL_KS_PROPERTY
struct KSPIN_CONNECT * PKSPIN_CONNECT
#define KSDATAFORMAT_ATTRIBUTES
@ KSINTERFACE_STANDARD_STREAMING
#define IOCTL_KS_WRITE_STREAM
KSDDKAPI DWORD NTAPI KsCreatePin(HANDLE FilterHandle, PKSPIN_CONNECT Connect, ACCESS_MASK DesiredAccess, PHANDLE ConnectionHandle)
#define FILE_FLAG_OVERLAPPED
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
_In_ ULONG _In_ ULONG _In_ ULONG Length
SP_DEVICE_INTERFACE_DETAIL_DATA_A SP_DEVICE_INTERFACE_DETAIL_DATA
#define SetupDiGetDeviceInterfaceDetail
#define DIGCF_DEVICEINTERFACE
#define SetupDiGetClassDevs
SP_DEVICE_INTERFACE_DETAIL_DATA_A * PSP_DEVICE_INTERFACE_DETAIL_DATA
WCHAR Data[ANYSIZE_ARRAY]
KSPIN_INTERFACE Interface
CHAR DevicePath[ANYSIZE_ARRAY]
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
#define RtlZeroMemory(Destination, Length)
_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
#define IOCTL_OPEN_WDMAUD
#define IOCTL_GETCAPABILITIES
#define IOCTL_SETDEVICE_STATE
#define IOCTL_GETNUMDEVS_TYPE
DWORD WINAPI GetLastError(void)
_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